nixpkgs-suyu/pkgs/build-support
Adam Joseph 5ed4944130 fetchgit: allow passing allowedRequisites through to stdenv.mkDerivation
When maintainers override stages of `fetchgit' (e.g. `postPatch`) it
is very easy for them to accidentally leak the outpath-hash of their
current `stdenv` into `fetchgit''s output, and therefore into the
value they paste into `sha256`.

This is a problem, because the resulting expression will break
whenever any change is made to `stdenv` or when anybody attempts to
build the expression on a different platform than the one used by the
original maintainer.

Almost as much of a problem is the fact that CI **does not catch**
these problems.  The `fetchgit` is run only once, then its output goes
into cachix, and all future builds (hydra, CI, ofborg) pull from
cachix.

Let's offer maintainers the option to check that they aren't making
this mistake, by passing through `allowedRequisites`.  The default
value is `null`, but it might be worth changing that at some point in
the future.

It is also sometimes difficult to communicate to package maintainers
why their expression is problematic.  Having `allowedRequisites`
passed through makes it easier to do this: "look, when I switch on
`allowedRequisites` your package breaks; are you sure you meant to
hardcode the hash today's `x86_64-linux.stdenv` into your expression?`

For an example use case, see https://github.com/NixOS/nixpkgs/pull/171223

The issue above is part of a larger problem with nixpkgs infra: there
large parts of cachix cannot be reproduced easily if they are lost.
Once something ends goes into cachix, we never ever again reverify the
procedure by which it was placed into cachix.
2022-06-11 12:42:33 -07:00
..
add-opengl-runpath
agda
alternatives lapack,blas: allow for more flexible use of ILP64 interface 2022-02-11 17:51:35 +01:00
appimage Merge pull request #168713 from NixOS/appimage-drop-gconf 2022-06-03 19:25:26 +02:00
bintools-wrapper treewide: add enableParallelBuilding's to bootstrap packages so hashes stay the same 2022-05-25 16:03:14 +03:00
build-bazel-package
build-fhs-userenv buildFHSUserEnv: append graphics share to XDG_DATA_DIR 2022-03-24 12:53:39 -07:00
build-fhs-userenv-bubblewrap Merge pull request #164825 from ilya-fedin/fhs-less-copy 2022-04-11 16:37:01 +03:00
build-graalvm-native-image buildGraalvmNativeImage: mark as broken if Native Image is not available 2022-04-15 23:20:52 +01:00
build-setupcfg
buildenv
cc-wrapper treewide: add enableParallelBuilding's to bootstrap packages so hashes stay the same 2022-05-25 16:03:14 +03:00
coq coqPackages: etc 2022-05-25 20:00:25 +02:00
dhall
docker testers.invalidateFetcherByDrvHash: Move from top-level 2022-05-05 12:08:50 +02:00
dotnet buildDotnetModule: change default dotnet SDK and runtime to version 6 2022-05-16 21:39:35 +02:00
emacs emacsPackages.melpaBuild: Update package-build, avoid monkey-patch 2022-05-23 12:52:17 -07:00
expand-response-params treewide: add enableParallelBuilding's to bootstrap packages so hashes stay the same 2022-05-25 16:03:14 +03:00
fake-nss fakeNss: move to toplevel 2022-03-24 18:47:30 +01:00
fetchbitbucket
fetchbower
fetchbzr
fetchcvs
fetchdarcs
fetchdocker
fetchfirefoxaddon testers.invalidateFetcherByDrvHash: Move from top-level 2022-05-05 12:08:50 +02:00
fetchfossil
fetchgit fetchgit: allow passing allowedRequisites through to stdenv.mkDerivation 2022-06-11 12:42:33 -07:00
fetchgitea
fetchgithub unstableGitUpdater: fix updating fetchzip-based sources 2022-05-24 19:12:12 +02:00
fetchgitiles
fetchgitlab unstableGitUpdater: fix updating fetchzip-based sources 2022-05-24 19:12:12 +02:00
fetchgitlocal
fetchgx
fetchhg
fetchipfs treewide: clean up obsolete version checks 2022-03-22 10:54:11 +00:00
fetchmavenartifact
fetchmtn
fetchnextcloudapp treewide: remove nativeBuildInputs that are in stdenv 2022-04-16 21:46:46 +03:00
fetchpatch testers.invalidateFetcherByDrvHash: Move from top-level 2022-05-05 12:08:50 +02:00
fetchrepoorcz
fetchrepoproject
fetchs3
fetchsavannah
fetchsourcehut treewide: extraPostFetch -> postFetch 2022-05-23 17:18:50 +03:00
fetchsvn
fetchsvnrevision
fetchsvnssh
fetchurl Merge staging-next into staging 2022-05-24 00:02:57 +00:00
fetchzip treewide: extraPostFetch -> postFetch 2022-05-23 17:18:50 +03:00
flutter flutter.mkFlutterApp: fix installing .desktop 2022-02-23 15:10:59 +01:00
go garble: 0.5.1 -> 0.6.0 2022-03-23 06:31:49 +00:00
icon-conv-tools
install-shell-files
java
kernel compressFirmwareXz: fix with empty lib/firmware 2022-05-26 07:08:50 +00:00
libredirect
make-darwin-bundle Merge pull request #165111 from toonn/darwin-bundle-outputBin 2022-04-22 12:04:09 +01:00
make-desktopitem build-support/makeDesktopItem: remove workaround, fix quoting 2022-03-10 13:30:45 +03:00
make-startupitem
make-symlinks
mkshell
mono-dll-fixer
nix-gitignore treewide: clean up obsolete version checks 2022-03-22 10:54:11 +00:00
node/fetch-yarn-deps testers.invalidateFetcherByDrvHash: Move from top-level 2022-05-05 12:08:50 +02:00
nuke-references treewide: add enableParallelBuilding's to bootstrap packages so hashes stay the same 2022-05-25 16:03:14 +03:00
ocaml treewide: Simplify negated uses of versionAtLeast, versionOlder 2022-04-25 13:35:24 -07:00
oci-tools
pkg-config-wrapper treewide: add enableParallelBuilding's to bootstrap packages so hashes stay the same 2022-05-25 16:03:14 +03:00
prefer-remote-fetch
references-by-popularity
release
remove-references-to
replace-secret
rust fetchCargoTarball: allow adding nativeBuildInputs 2022-05-28 21:55:39 +03:00
setup-hooks makeBinaryWrapper: fix cross-compilation and add test 2022-05-31 13:55:41 +02:00
singularity-tools singularity: enable setting vm mem in buildImage 2022-03-03 17:09:48 -05:00
skaware skawarePackages.buildPackage: fix typo in comment 2022-05-09 15:52:56 +00:00
snap
src-only
substitute
substitute-files
templaterpm
testers testers.testVersion: if grep failed then print the output of the command 2022-05-16 16:16:35 +03:00
trivial-builders treewide: nixosTest -> testers.nixosTest 2022-05-09 14:16:06 +02:00
vm treewide: change some glibc to stdenv.cc.libc 2022-05-27 05:57:43 +03:00
wrapper-common
writers treewide: remove nativeBuildInputs that are in stdenv 2022-04-16 21:46:46 +03:00
build-maven.nix
build-pecl.nix
closure-info.nix
plugins.nix
replace-dependency.nix
setup-systemd-units.nix
source-from-head-fun.nix
trivial-builders.nix treewide: remove usage of runCommandNoCC aliases 2022-06-07 16:57:06 +02:00