nixpkgs/pkgs/build-support
Valentin Gagarin c59a777a97 nix-prefetch-git: add --name parameter
This allows tools like `npins` to avoid re-downloading pre-fetched sources at evaluation time,
by setting the same symbolic store path name as `builtins.fetchGit` does,
and would make hacks such as [0] obsolete.

Historical note: `builtins.fetchGit` was introduced in 2016 [1] and
released in 2018 [2]. Before that, there was only the Nixpkgs `fetchgit`,
and the convention for using constant store path names [3] was not established yet [4].

While arguably in retrospect store path names were a mistake, we cannot
undo it here even partially by setting them to a constant, as it would invalidate
countless fixed-output derivations and thus incur an increase in
resource consumption and potentially a large number of build failures.

[0]: f0449d090c
[1]: 38539b943a
[2]: https://github.com/NixOS/nix/releases/tag/2.0
[3]: db00265e81/source/guides/best-practices.md (L263-L264)
[4]: a8603605aa
2025-04-15 12:10:00 +02:00
..
agda
appimage treewide: Format all Nix files 2025-04-01 20:10:43 +02:00
binary-cache mkBinaryCache: add missing .nar extension 2025-03-08 17:50:37 +07:00
bintools-wrapper treewide: Format all Nix files 2025-04-01 20:10:43 +02:00
build-bazel-package treewide: Format all Nix files 2025-04-01 20:10:43 +02:00
build-fhsenv-bubblewrap treewide: Format all Nix files 2025-04-01 20:10:43 +02:00
build-fhsenv-chroot
build-graalvm-native-image
buildenv
cc-wrapper Merge remote-tracking branch 'upstream/staging-next' into staging 2025-04-02 18:30:54 +02:00
compress-drv compress-drv: passthru passthru and meta 2025-03-08 21:00:46 +01:00
coq treewide: Format all Nix files 2025-04-01 20:10:43 +02:00
dart treewide: Format all Nix files 2025-04-01 20:10:43 +02:00
dev-shell-tools
dhall
dlang Revert "treewide: replace rev with tag" 2025-04-08 02:57:25 -04:00
docker treewide: Format all Nix files 2025-04-01 20:10:43 +02:00
dotnet fetchnuget: improve "multiple hashes" error message 2025-03-25 10:11:28 -07:00
fetch9front
fetchbitbucket
fetchbower
fetchbzr
fetchcvs
fetchdarcs
fetchdebianpatch
fetchdocker treewide: Format all Nix files 2025-04-01 20:10:43 +02:00
fetchfirefoxaddon treewide: Format all Nix files 2025-04-01 20:10:43 +02:00
fetchfossil
fetchgit nix-prefetch-git: add --name parameter 2025-04-15 12:10:00 +02:00
fetchgitea
fetchgithub treewide: Format all Nix files 2025-04-01 20:10:43 +02:00
fetchgitiles
fetchgitlab
fetchgitlocal
fetchgx
fetchhg treewide: fix typos in comments 2025-02-24 10:44:41 +01:00
fetchipfs
fetchmavenartifact
fetchmtn
fetchnextcloudapp nextcloud: update maintainer information 2025-03-25 12:41:18 +00:00
fetchpatch
fetchpijul
fetchpypi treewide: Format all Nix files 2025-04-01 20:10:43 +02:00
fetchpypilegacy
fetchrepoorcz
fetchrepoproject
fetchs3
fetchsavannah fetchFromSavannah: support repos like emacs/elpa 2025-03-23 00:13:15 +08:00
fetchsourcehut
fetchsvn
fetchsvnrevision
fetchsvnssh
fetchtorrent
fetchurl fetchurl: update samba mirrors' URLs 2025-04-02 18:12:01 +00:00
fetchzip
go go: write down toolchain/builder upgrade policy 2025-04-02 09:56:33 +02:00
kernel make-initrd-ng: Restore stripped file permissions 2025-04-13 12:02:16 -04:00
lib treewide: Format all Nix files 2025-04-01 20:10:43 +02:00
make-darwin-bundle treewide: fix typos in comments 2025-02-24 10:44:41 +01:00
make-desktopitem treewide: Format all Nix files 2025-04-01 20:10:43 +02:00
make-hardcode-gsettings-patch
make-pkgconfigitem
make-startupitem
mitm-cache Revert "treewide: replace rev with tag" 2025-04-08 02:57:25 -04:00
mkshell treewide: Format all Nix files 2025-04-01 20:10:43 +02:00
nix-gitignore
node Merge remote-tracking branch 'origin/master' into staging-next 2025-04-10 16:30:48 +03:00
nuke-references treewide: Format all Nix files 2025-04-01 20:10:43 +02:00
ocaml
oci-tools
php build-support/php: enable support for dontCheckForBrokenSymlinks set to true by default 2025-03-04 23:23:20 +01:00
pkg-config-wrapper treewide: fix typos in comments 2025-02-24 10:44:41 +01:00
portable-service
prefer-remote-fetch
references-by-popularity
release treewide: fix typos in comments 2025-02-24 10:44:41 +01:00
remove-references-to
replace-secret
replace-vars
rocq treewide: Format all Nix files 2025-04-01 20:10:43 +02:00
rust Merge master into staging-next 2025-04-13 06:04:51 +00:00
setup-hooks noBrokenSymlinks: check for unreadable symlinks 2025-03-05 15:46:37 -05:00
singularity-tools
src-only
substitute
substitute-files treewide: Format all Nix files 2025-04-01 20:10:43 +02:00
testers treewide: Format all Nix files 2025-04-01 20:10:43 +02:00
trivial-builders treewide: Format all Nix files 2025-04-01 20:10:43 +02:00
vm treewide: Format all Nix files 2025-04-01 20:10:43 +02:00
wasm-bindgen-cli treewide: remove unused rec expressions 2025-03-14 05:15:05 +01:00
wrapper-common
writers nginx: output config on failed gixy check 2025-03-13 17:42:19 +01:00
xen treewide: Format all Nix files 2025-04-01 20:10:43 +02:00
build-nim-package.nix
build-nim-sbom.nix
checkpoint-build.nix
closure-info.nix closureInfo: write a doc comment 2025-03-18 15:32:57 -07:00
make-impure-test.nix
plugins.nix
replace-dependencies.nix
replace-direct-dependencies.nix
setup-systemd-units.nix
source-from-head-fun.nix treewide: fix typos in comments 2025-02-24 10:44:41 +01:00