nixpkgs/pkgs/build-support/rust/test/import-cargo-lock/v1/default.nix
Winter 115e3413e1 rustPlatform.importCargoLock: add support for v1 lock files
v1 lock files (generated by default by Cargo versions 1.40 and below)
use a single table, `metadata`, to store the checksums of packages.

The primary motivation for doing this now is that we're considering
vendoring all Cargo lock files in Nixpkgs, some packages still use it
(e.g. cargo-asm), and adding support for it doesn't increase the
complexity of the function. No matter the outcome of the vendoring
discussion, this is a nice thing to have because Cargo still supports v1
lock files.
2023-02-26 00:45:40 -05:00

19 lines
229 B
Nix

{ rustPlatform }:
rustPlatform.buildRustPackage {
pname = "v1";
version = "0.1.0";
src = ./.;
cargoLock = {
lockFile = ./Cargo.lock;
};
doInstallCheck = true;
installCheckPhase = ''
$out/bin/v1
'';
}