Skip to content

Commit

Permalink
nix flake
Browse files Browse the repository at this point in the history
  • Loading branch information
szymonkaliski committed Feb 8, 2024
1 parent 76dcc31 commit d920a63
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 1 deletion.
1 change: 1 addition & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
use flake
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Running:

- `bun install`
- `bun run build`
- `bun run build` / `bun run build:debug`
- `bun test`

The code mainly targets Bun, but does work in Node too.
Expand Down
27 changes: 27 additions & 0 deletions flake.lock

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

24 changes: 24 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";

outputs = { self, nixpkgs }:
let
mkDevShell = system:
let
pkgs = nixpkgs.legacyPackages.${system};
in
pkgs.mkShell {
buildInputs = with pkgs; [
bun
cargo
libiconv
rustc
rustfmt
];
};
in
{
devShells.aarch64-darwin.default = mkDevShell "aarch64-darwin";
devShells.x86_64-darwin.default = mkDevShell "x86_64-darwin";
};
}

0 comments on commit d920a63

Please sign in to comment.