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-13 11:22:07 -0500
committerfigsoda <figsoda@pm.me>2022-12-13 11:27:26 -0500
commitcce3dc63a02b34d61326dc155a933a91d6937ccc (patch)
tree6784af9c17fd50aee99fbe0eda8d1675631ce981 /doc/languages-frameworks/rust.section.md
parent4516b17cf45931b5b47188f9a47e11359eaf5b09 (diff)
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 3ede908fe089d..168120c7fca94 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