diff options
| author | diogo464 <[email protected]> | 2024-08-06 18:22:11 +0100 |
|---|---|---|
| committer | diogo464 <[email protected]> | 2024-08-06 18:22:11 +0100 |
| commit | 6f9262c0bc62ffaf0af62e2cb18d2590e3067645 (patch) | |
| tree | b74e80f1bed792145dba6e62c6f82f29ac5a715a /flake.nix | |
| parent | e62270b966a2cca1cffbb790cdc6a5130fd81c49 (diff) | |
added nix flake stuff
Diffstat (limited to 'flake.nix')
| -rw-r--r-- | flake.nix | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..2e9252f --- /dev/null +++ b/flake.nix | |||
| @@ -0,0 +1,25 @@ | |||
| 1 | { | ||
| 2 | inputs = { | ||
| 3 | naersk.url = "github:nix-community/naersk/master"; | ||
| 4 | nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; | ||
| 5 | utils.url = "github:numtide/flake-utils"; | ||
| 6 | }; | ||
| 7 | |||
| 8 | outputs = { self, nixpkgs, utils, naersk }: | ||
| 9 | utils.lib.eachDefaultSystem (system: | ||
| 10 | let | ||
| 11 | pkgs = import nixpkgs { inherit system; }; | ||
| 12 | naersk-lib = pkgs.callPackage naersk { }; | ||
| 13 | in | ||
| 14 | { | ||
| 15 | defaultPackage = naersk-lib.buildPackage { | ||
| 16 | src = ./.; | ||
| 17 | RUSTC_BOOTSTRAP = 1; | ||
| 18 | }; | ||
| 19 | devShell = with pkgs; mkShell { | ||
| 20 | buildInputs = [ cargo rustc rustfmt pre-commit rustPackages.clippy ]; | ||
| 21 | RUST_SRC_PATH = rustPlatform.rustLibSrc; | ||
| 22 | }; | ||
| 23 | } | ||
| 24 | ); | ||
| 25 | } | ||
