e6dc0fb1a1
When added the new sparse protocol the derivation is not handling properly Cargo.lock with sparse+ registries
34 lines
585 B
Nix
34 lines
585 B
Nix
{ lib, rustPlatform }:
|
|
let
|
|
fs = lib.fileset;
|
|
in
|
|
rustPlatform.buildRustPackage {
|
|
pname = "basic-sparse";
|
|
version = "0.1.0";
|
|
|
|
src = fs.toSource {
|
|
root = ./.;
|
|
fileset = fs.unions [
|
|
./.cargo/config.toml
|
|
./Cargo.toml
|
|
./Cargo.lock
|
|
./src
|
|
];
|
|
};
|
|
|
|
cargoLock = {
|
|
lockFile = ./Cargo.lock;
|
|
extraRegistries = {
|
|
"sparse+https://index.crates.io/" = "https://static.crates.io/crates";
|
|
};
|
|
};
|
|
|
|
doInstallCheck = true;
|
|
postConfigure = ''
|
|
cargo metadata --offline
|
|
'';
|
|
installCheckPhase = ''
|
|
$out/bin/basic-sparse
|
|
'';
|
|
}
|