Skip to content

Commit 094a87f

Browse files
committed
fix: respect fetchurl passed via top-level Cargo.nix
This seems to be an overlook. `fetchurl` for registries is using the one from function argument, and falls back to `pkgs.fetchurl`. This PR makes fetches for `.crate` tarballs aligned.
1 parent be31fea commit 094a87f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

crate2nix/templates/nix/crate2nix/default.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,7 @@ rec {
417417
crateConfig
418418
// {
419419
src =
420-
crateConfig.src or (pkgs.fetchurl rec {
420+
crateConfig.src or (fetchurl rec {
421421
name = "${crateConfig.crateName}-${crateConfig.version}.tar.gz";
422422
# https://www.pietroalbini.org/blog/downloading-crates-io/
423423
# Not rate-limited, CDN URL.

0 commit comments

Comments
 (0)