Skip to content

Commit

Permalink
Merge pull request #48 from Noot-tooN/main
Browse files Browse the repository at this point in the history
Add bun development flake
  • Loading branch information
lucperkins authored Jun 22, 2024
2 parents 615e7e8 + 70057cc commit 5b1d326
Show file tree
Hide file tree
Showing 4 changed files with 57 additions and 0 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ Once your preferred template has been initialized, you can use the provided shel

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

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.

### [`bun`](./bun/)

- [bun] 1.1.8

### [`c-cpp`](./c-cpp/)

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

[boot]: https://www.boot-clj.com
[buf]: https://github.com/bufbuild/buf
[bun]: https://bun.sh/
[C]: https://www.open-std.org/jtc1/sc22/wg14
[C++]: https://isocpp.org
[cabal]: https://www.haskell.org/cabal
Expand Down
1 change: 1 addition & 0 deletions bun/.envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
use flake
25 changes: 25 additions & 0 deletions bun/flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

25 changes: 25 additions & 0 deletions bun/flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
description = "A Nix-flake-based Bun development environment";

inputs.nixpkgs.url = "https://flakehub.com/f/NixOS/nixpkgs/0.1.*.tar.gz";

outputs = { self, nixpkgs }:
let
overlays = [
(final: prev: rec {
bun = prev.bun;
})
];
supportedSystems = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ];
forEachSupportedSystem = f: nixpkgs.lib.genAttrs supportedSystems (system: f {
pkgs = import nixpkgs { inherit overlays system; };
});
in
{
devShells = forEachSupportedSystem ({ pkgs }: {
default = pkgs.mkShell {
packages = with pkgs; [ bun ];
};
});
};
}

0 comments on commit 5b1d326

Please sign in to comment.