mirror of
https://github.com/ipetkov/crane.git
synced 2024-11-29 21:42:23 +03:00
32 lines
405 B
Nix
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;
|
|
})
|