crane/lib/buildWithCargo.nix

22 lines
321 B
Nix
Raw Normal View History

{ cargo
, configureCargoVendoredDepsHook
, lib
, stdenv
}:
args@{ nativeBuildInputs ? [ ], ... }:
stdenv.mkDerivation (args // {
nativeBuildInputs = nativeBuildInputs ++ [
cargo
configureCargoVendoredDepsHook
];
buildPhase = ''
cargo check --release
'';
installPhase = ''
touch $out
'';
})