summaryrefslogtreecommitdiffstats
path: root/pkgs/stdenv
diff options
context:
space:
mode:
authorKevin Cox <kevincox@kevincox.ca>2020-11-05 09:12:28 -0500
committerGitHub <noreply@github.com>2020-11-05 09:12:28 -0500
commite371443a1e663d385b78d9f47b6a49f2620698e2 (patch)
tree6ce4e595fb9165c77408f48c57d1f59d59b9a0c8 /pkgs/stdenv
parentde57e3b630bad2626fbd569825cd6fd0d53d524d (diff)
parent4a26f177c93099e551ed5cd949a89f631da53a52 (diff)
Merge pull request #101833 from wamserma/allow-via-env
stdenv/check-meta: add hint to NIXPKGS_ALLOW_* for unfree/broken/…
Diffstat (limited to 'pkgs/stdenv')
-rw-r--r--pkgs/stdenv/generic/check-meta.nix19
1 files changed, 17 insertions, 2 deletions
diff --git a/pkgs/stdenv/generic/check-meta.nix b/pkgs/stdenv/generic/check-meta.nix
index c06f17b6fc19..b93ea558eac2 100644
--- a/pkgs/stdenv/generic/check-meta.nix
+++ b/pkgs/stdenv/generic/check-meta.nix
@@ -88,13 +88,28 @@ let
broken-outputs = remediateOutputsToInstall;
unknown-meta = x: "";
};
+ remediation_env_var = allow_attr: {
+ Unfree = "NIXPKGS_ALLOW_UNFREE";
+ Broken = "NIXPKGS_ALLOW_BROKEN";
+ UnsupportedSystem = "NIXPKGS_ALLOW_UNSUPPORTED_SYSTEM";
+ }.${allow_attr};
+ remediation_phrase = allow_attr: {
+ Unfree = "unfree packages";
+ Broken = "broken packages";
+ UnsupportedSystem = "packages that are unsupported for this system";
+ }.${allow_attr};
remediate_whitelist = allow_attr: attrs:
''
- a) For `nixos-rebuild` you can set
+ a) To temporarily allow ${remediation_phrase allow_attr}, you can use an environment variable
+ for a single invocation of the nix tools.
+
+ $ export ${remediation_env_var allow_attr}=1
+
+ b) For `nixos-rebuild` you can set
{ nixpkgs.config.allow${allow_attr} = true; }
in configuration.nix to override this.
- b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
+ c) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
{ allow${allow_attr} = true; }
to ~/.config/nixpkgs/config.nix.
'';