diff options
Diffstat (limited to 'nixpkgs/pkgs/build-support/rust/test/import-cargo-lock/git-dependency/default.nix')
-rw-r--r-- | nixpkgs/pkgs/build-support/rust/test/import-cargo-lock/git-dependency/default.nix | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/build-support/rust/test/import-cargo-lock/git-dependency/default.nix b/nixpkgs/pkgs/build-support/rust/test/import-cargo-lock/git-dependency/default.nix new file mode 100644 index 000000000000..98aa35bf8e1d --- /dev/null +++ b/nixpkgs/pkgs/build-support/rust/test/import-cargo-lock/git-dependency/default.nix @@ -0,0 +1,30 @@ +{ lib, rustPlatform }: +let + fs = lib.fileset; +in +rustPlatform.buildRustPackage { + pname = "git-dependency"; + version = "0.1.0"; + + src = fs.toSource { + root = ./.; + fileset = fs.unions [ + ./Cargo.toml + ./Cargo.lock + ./src + ]; + }; + + cargoLock = { + lockFile = ./Cargo.lock; + outputHashes = { + "rand-0.8.3" = "0ya2hia3cn31qa8894s3av2s8j5bjwb6yq92k0jsnlx7jid0jwqa"; + }; + }; + + doInstallCheck = true; + + installCheckPhase = '' + $out/bin/git-dependency + ''; +} |