about summary refs log tree commit diff
path: root/lib
diff options
context:
space:
mode:
authorSilvan Mosberger <contact@infinisil.com>2024-01-04 21:44:50 +0100
committerSilvan Mosberger <contact@infinisil.com>2024-01-07 23:31:11 +0100
commit56df668386ac83c5bcddf9849c645cf0d25706d7 (patch)
tree5f745b1c6cfc1728fa753b3c4fab2112b6a8da2c /lib
parent3e929146cf01b532ec68a2f73af22271effdc75d (diff)
downloadnixlib-56df668386ac83c5bcddf9849c645cf0d25706d7.tar
nixlib-56df668386ac83c5bcddf9849c645cf0d25706d7.tar.gz
nixlib-56df668386ac83c5bcddf9849c645cf0d25706d7.tar.bz2
nixlib-56df668386ac83c5bcddf9849c645cf0d25706d7.tar.lz
nixlib-56df668386ac83c5bcddf9849c645cf0d25706d7.tar.xz
nixlib-56df668386ac83c5bcddf9849c645cf0d25706d7.tar.zst
nixlib-56df668386ac83c5bcddf9849c645cf0d25706d7.zip
lib.callPackageWith: Use abort, not throw
This reverts f8ea911f7c4e44b167d4b1b51f6d00ebd93e1ed1, see also https://github.com/NixOS/nixpkgs/pull/271123#discussion_r1442134594
Diffstat (limited to 'lib')
-rw-r--r--lib/customisation.nix6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/customisation.nix b/lib/customisation.nix
index c233744e07ca..0b5cad71fddf 100644
--- a/lib/customisation.nix
+++ b/lib/customisation.nix
@@ -203,7 +203,11 @@ rec {
 
     in if missingArgs == {}
        then makeOverridable f allArgs
-       else throw "lib.customisation.callPackageWith: ${error}";
+       # This needs to be an abort so it can't be caught with `builtins.tryEval`,
+       # which is used by nix-env and ofborg to filter out packages that don't evaluate.
+       # This way we're forced to fix such errors in Nixpkgs,
+       # which is especially relevant with allowAliases = false
+       else abort "lib.customisation.callPackageWith: ${error}";
 
 
   /* Like callPackage, but for a function that returns an attribute