Skip to content

Commit

Permalink
nix: package+devShell: set strictDeps = true
Browse files Browse the repository at this point in the history
  • Loading branch information
spikespaz committed Aug 27, 2024
1 parent 87249e1 commit 2cd6e97
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
1 change: 1 addition & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
in {
devShells = lib.mapAttrs (system: pkgs: {
default = pkgs.mkShell {
strictDeps = true;
buildInputs = [ pkgs.rust-bin.stable.${rustVersion}.default ];
};
}) pkgsFor;
Expand Down
14 changes: 14 additions & 0 deletions nix/overlay.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
final: _:
let
rust-bin = rust-overlay.lib.mkRustBin { } final;
rust-stable = rust-bin.stable.${rustVersion}.minimal;
rustPlatform = final.makeRustPlatform {
cargo = rust-stable;
rustc = rust-stable;
};
in {
${packageName} = final.callPackage ./nix/package.nix {
sourceRoot = self;
inherit rustPlatform;
};
}
1 change: 1 addition & 0 deletions nix/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ in rustPlatform.buildRustPackage {
version = manifest.package.version;
cargoLock.lockFile = "${sourceRoot}/Cargo.lock";
src = lib.cleanSource sourceRoot;
strictDeps = true;
}

0 comments on commit 2cd6e97

Please sign in to comment.