diff --git a/flake.nix b/flake.nix index 190d497..62c5763 100644 --- a/flake.nix +++ b/flake.nix @@ -15,20 +15,22 @@ cargoToml = fromTOML (builtins.readFile ./Cargo.toml); name = cargoToml.package.name; - nativeBuildInputs = with pkgs; [ - m4 - ]; - in - { - packages.default = pkgs.rustPlatform.buildRustPackage { - inherit name nativeBuildInputs; + crate = pkgs.rustPlatform.buildRustPackage { + inherit name; src = ./.; cargoLock.lockFile = ./Cargo.lock; + + nativeBuildInputs = with pkgs; [ + m4 + ]; }; + in + { + packages.default = crate; devShells.default = pkgs.mkShell { - inherit nativeBuildInputs; + inputsFrom = [ crate ]; packages = with pkgs; [ rustc