crane/lib/devShell.nix
2023-09-03 10:33:10 -07:00

32 lines
405 B
Nix

{ lib
, mkShell
, rustPlatform
, cargo
, rustc
}:
{ checks ? { }
, inputsFrom ? [ ]
, packages ? [ ]
, ...
}@args:
let
inherit (builtins) removeAttrs;
cleanedArgs = removeAttrs args [
"checks"
"inputsFrom"
"nativeBuildInputs"
];
in
mkShell (cleanedArgs // {
inputsFrom = builtins.attrValues checks ++ inputsFrom;
packages =
[
rustc
cargo
]
++ packages;
})