From 9d60e3dd29cf2d95f707223bedcb3260716911f9 Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Wed, 13 Apr 2022 23:13:33 -0700 Subject: [PATCH] stdenv: use disallowedRequisites to check forbidden requisites --- pkgs/stdenv/generic/default.nix | 2 ++ pkgs/stdenv/linux/default.nix | 2 ++ 2 files changed, 4 insertions(+) diff --git a/pkgs/stdenv/generic/default.nix b/pkgs/stdenv/generic/default.nix index 4fb98e5e8013..66a95759968d 100644 --- a/pkgs/stdenv/generic/default.nix +++ b/pkgs/stdenv/generic/default.nix @@ -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). @@ -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. diff --git a/pkgs/stdenv/linux/default.nix b/pkgs/stdenv/linux/default.nix index d2c28b97ff93..dfba741673c8 100644 --- a/pkgs/stdenv/linux/default.nix +++ b/pkgs/stdenv/linux/default.nix @@ -404,6 +404,8 @@ in shellPackage = prevStage.bash; }; + disallowedRequisites = [ bootstrapTools.out ]; + # Mainly avoid reference to bootstrap tools allowedRequisites = with prevStage; with lib; # Simple executable tools