]> git.sesse.net Git - bcachefs-tools-debian/commitdiff
nix: add devShell
authorFinn Behrens <me@kloenk.de>
Sun, 5 Nov 2023 10:44:27 +0000 (11:44 +0100)
committerFinn Behrens <me@kloenk.dev>
Thu, 9 Nov 2023 22:13:43 +0000 (23:13 +0100)
Add a nix devShell output to provide a development environment for nix users.

Signed-off-by: Finn Behrens <me@kloenk.de>
flake.nix

index bdaa4bfdb55f7379cc4dea18cc63cc72c58a08ea..c4185e77eac03aadec9497c2ea0abaedef400096 100644 (file)
--- a/flake.nix
+++ b/flake.nix
         };
 
         formatter = pkgs.nixfmt;
+
+        devShells.default = pkgs.callPackage ({ mkShell, rustc, cargo, gnumake
+          , gcc, clang, pkg-config, libuuid, libsodium, keyutils, liburcu, zlib
+          , libaio, zstd, lz4, udev, bcachefs }:
+          mkShell {
+            LIBCLANG_PATH = "${clang.cc.lib}/lib";
+            inherit (bcachefs) nativeBuildInputs buildInputs;
+          }) { };
       });
 }