From 781b9eab6163bba203dd536c965bc0b153522d6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Domen=20Ko=C5=BEar?= Date: Wed, 9 Dec 2015 17:00:33 +0100 Subject: [PATCH] allow{reason}: a bit more explicit error message --- pkgs/stdenv/generic/default.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkgs/stdenv/generic/default.nix b/pkgs/stdenv/generic/default.nix index 8e6bf2be63f6..2fb1f8b39ae4 100644 --- a/pkgs/stdenv/generic/default.nix +++ b/pkgs/stdenv/generic/default.nix @@ -126,10 +126,11 @@ let throw ("Package ‘${attrs.name or "«name-missing»"}’ in ${pos''} ${errormsg}, refusing to evaluate." + (lib.strings.optionalString (reason != "blacklisted") '' - For `nixos-rebuild` you can set + a) For `nixos-rebuild` you can set { nixpkgs.config.allow${up reason} = true; } in configuration.nix to override this. - For `nix-env` you can add + + b) For `nix-env`, `nix-build` or any other Nix command you can add { allow${up reason} = true; } to ~/.nixpkgs/config.nix. ''));