about summary refs log tree commit diff
path: root/doc/languages-frameworks/rust.section.md
diff options
context:
space:
mode:
authorfigsoda <figsoda@pm.me>2022-12-25 19:38:36 -0500
committerGitHub <noreply@github.com>2022-12-25 19:38:36 -0500
commitb6c0e7f563cbaecc12919f5b767bc1af7e2fb474 (patch)
treecbb3f9c9df07b69b71b6eda47f06b33e897bf1e9 /doc/languages-frameworks/rust.section.md
parent6f0300f064a95c211ca58fc449652b05a251df29 (diff)
parentcce3dc63a02b34d61326dc155a933a91d6937ccc (diff)
Merge pull request #205935 from figsoda/cargo-lock
rustPlatform.importCargoLock: add allowBuiltinFetchGit option
Diffstat (limited to 'doc/languages-frameworks/rust.section.md')
-rw-r--r--doc/languages-frameworks/rust.section.md17
1 files changed, 17 insertions, 0 deletions
diff --git a/doc/languages-frameworks/rust.section.md b/doc/languages-frameworks/rust.section.md
index a9d8e54cafd89..ec703105e15a3 100644
--- a/doc/languages-frameworks/rust.section.md
+++ b/doc/languages-frameworks/rust.section.md
@@ -186,6 +186,23 @@ added. To find the correct hash, you can first use `lib.fakeSha256` or
 `lib.fakeHash` as a stub hash. Building the package (and thus the
 vendored dependencies) will then inform you of the correct hash.
 
+For usage outside nixpkgs, `allowBuiltinFetchGit` could be used to
+avoid having to specify `outputHashes`. For example:
+
+```nix
+rustPlatform.buildRustPackage rec {
+  pname = "myproject";
+  version = "1.0.0";
+
+  cargoLock = {
+    lockFile = ./Cargo.lock;
+    allowBuiltinFetchGit = true;
+  };
+
+  # ...
+}
+```
+
 ### Cargo features {#cargo-features}
 
 You can disable default features using `buildNoDefaultFeatures`, and