crane/lib/buildWithCargo.nix

24 lines
385 B
Nix
Raw Normal View History

{ cargo
2021-12-27 04:10:04 +03:00
, configureCargoCommonVarsHook
, configureCargoVendoredDepsHook
, lib
, stdenv
}:
args@{ nativeBuildInputs ? [ ], ... }:
stdenv.mkDerivation (args // {
nativeBuildInputs = nativeBuildInputs ++ [
cargo
2021-12-27 04:10:04 +03:00
configureCargoCommonVarsHook
configureCargoVendoredDepsHook
];
buildPhase = ''
cargo check --release
'';
installPhase = ''
touch $out
'';
})