aboutsummaryrefslogtreecommitdiff
path: root/flake.nix
diff options
context:
space:
mode:
Diffstat (limited to 'flake.nix')
-rw-r--r--flake.nix25
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}