Skip to content

Commit

Permalink
Merge pull request #168590 from amjoseph-nixpkgs/stdenv-disallowedRef…
Browse files Browse the repository at this point in the history
…erences

stdenv: use disallowedRequisites to check forbidden requisites
  • Loading branch information
Artturin authored Jul 17, 2022
2 parents bf59183 + 9d60e3d commit 111abd8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkgs/stdenv/generic/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ argsStdenv@{ name ? "stdenv", preHook ? "", initialPath

, shell
, allowedRequisites ? null, extraAttrs ? {}, overrides ? (self: super: {}), config
, disallowedRequisites ? []

, # The `fetchurl' to use for downloading curl and its dependencies
# (see all-packages.nix).
Expand Down Expand Up @@ -97,6 +98,7 @@ let
}
// {
inherit name;
inherit disallowedRequisites;

# Nix itself uses the `system` field of a derivation to decide where to
# build it. This is a bit confusing for cross compilation.
Expand Down
2 changes: 2 additions & 0 deletions pkgs/stdenv/linux/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -421,6 +421,8 @@ in
shellPackage = prevStage.bash;
};

disallowedRequisites = [ bootstrapTools.out ];

# Mainly avoid reference to bootstrap tools
allowedRequisites = with prevStage; with lib;
# Simple executable tools
Expand Down

0 comments on commit 111abd8

Please sign in to comment.