summary refs log tree commit diff
path: root/pkgs/build-support/rust/test/import-cargo-lock/git-dependency/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/build-support/rust/test/import-cargo-lock/git-dependency/default.nix')
-rw-r--r--pkgs/build-support/rust/test/import-cargo-lock/git-dependency/default.nix21
1 files changed, 21 insertions, 0 deletions
diff --git a/pkgs/build-support/rust/test/import-cargo-lock/git-dependency/default.nix b/pkgs/build-support/rust/test/import-cargo-lock/git-dependency/default.nix
new file mode 100644
index 00000000000..17276c5f5c3
--- /dev/null
+++ b/pkgs/build-support/rust/test/import-cargo-lock/git-dependency/default.nix
@@ -0,0 +1,21 @@
+{ rustPlatform }:
+
+rustPlatform.buildRustPackage {
+  pname = "git-dependency";
+  version = "0.1.0";
+
+  src = ./.;
+
+  cargoLock = {
+    lockFile = ./Cargo.lock;
+    outputHashes = {
+      "rand-0.8.3" = "0l3p174bpwia61vcvxz5mw65a13ri3wy94z04xrnyy5lzciykz4f";
+    };
+  };
+
+  doInstallCheck = true;
+
+  installCheckPhase = ''
+    $out/bin/git-dependency
+  '';
+}