Skip to content

Commit 70057cc

Browse files
committed
Add bun development flake
1 parent 615e7e8 commit 70057cc

File tree

4 files changed

+57
-0
lines changed

4 files changed

+57
-0
lines changed

README.md

+6
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ Once your preferred template has been initialized, you can use the provided shel
2929

3030
| Language/framework/tool | Template |
3131
| :----------------------- | :---------------------------- |
32+
| [Bun] | [`bun`](./bun/) |
3233
| [C]/[C++] | [`c-cpp`](./c-cpp/) |
3334
| [Clojure] | [`clojure`](./clojure/) |
3435
| [C#][csharp] | [`csharp`](./csharp/) |
@@ -65,6 +66,10 @@ Once your preferred template has been initialized, you can use the provided shel
6566

6667
The sections below list what each template includes. In all cases, you're free to add and remove packages as you see fit; the templates are just boilerplate.
6768

69+
### [`bun`](./bun/)
70+
71+
- [bun] 1.1.8
72+
6873
### [`c-cpp`](./c-cpp/)
6974

7075
- [clang-tools] 17.0.6
@@ -283,6 +288,7 @@ All of the templates have only the root [flake](./flake.nix) as a flake input. T
283288

284289
[boot]: https://www.boot-clj.com
285290
[buf]: https://github.com/bufbuild/buf
291+
[bun]: https://bun.sh/
286292
[C]: https://www.open-std.org/jtc1/sc22/wg14
287293
[C++]: https://isocpp.org
288294
[cabal]: https://www.haskell.org/cabal

bun/.envrc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
use flake

bun/flake.lock

+25
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

bun/flake.nix

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
description = "A Nix-flake-based Bun development environment";
3+
4+
inputs.nixpkgs.url = "https://flakehub.com/f/NixOS/nixpkgs/0.1.*.tar.gz";
5+
6+
outputs = { self, nixpkgs }:
7+
let
8+
overlays = [
9+
(final: prev: rec {
10+
bun = prev.bun;
11+
})
12+
];
13+
supportedSystems = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ];
14+
forEachSupportedSystem = f: nixpkgs.lib.genAttrs supportedSystems (system: f {
15+
pkgs = import nixpkgs { inherit overlays system; };
16+
});
17+
in
18+
{
19+
devShells = forEachSupportedSystem ({ pkgs }: {
20+
default = pkgs.mkShell {
21+
packages = with pkgs; [ bun ];
22+
};
23+
});
24+
};
25+
}

0 commit comments

Comments
 (0)