about summary refs log tree commit diff
path: root/nixpkgs/pkgs/build-support/rust/test/import-cargo-lock/git-dependency-rev/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/build-support/rust/test/import-cargo-lock/git-dependency-rev/default.nix')
-rw-r--r--nixpkgs/pkgs/build-support/rust/test/import-cargo-lock/git-dependency-rev/default.nix30
1 files changed, 30 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/build-support/rust/test/import-cargo-lock/git-dependency-rev/default.nix b/nixpkgs/pkgs/build-support/rust/test/import-cargo-lock/git-dependency-rev/default.nix
new file mode 100644
index 000000000000..d3cb0fa7df81
--- /dev/null
+++ b/nixpkgs/pkgs/build-support/rust/test/import-cargo-lock/git-dependency-rev/default.nix
@@ -0,0 +1,30 @@
+{ lib, rustPlatform }:
+let
+  fs = lib.fileset;
+in
+rustPlatform.buildRustPackage {
+  pname = "git-dependency-rev";
+  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" = "0l3p174bpwia61vcvxz5mw65a13ri3wy94z04xrnyy5lzciykz4f";
+    };
+  };
+
+  doInstallCheck = true;
+
+  installCheckPhase = ''
+    $out/bin/git-dependency-rev
+  '';
+}