about summary refs log tree commit diff
path: root/nixpkgs/lib
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2024-01-10 01:11:23 +0100
committerAlyssa Ross <hi@alyssa.is>2024-01-10 01:11:23 +0100
commitc8d05d8abadb244bc4e6cee75d450978d1f09a61 (patch)
tree2d710425b8e3f78e84d5e46abb3397cb1b34ec18 /nixpkgs/lib
parentad899504860973e98351c922ecb934595f2c0f19 (diff)
parent0ed96eed101462bf05e1e99e1bbadcd49b4eb302 (diff)
downloadnixlib-c8d05d8abadb244bc4e6cee75d450978d1f09a61.tar
nixlib-c8d05d8abadb244bc4e6cee75d450978d1f09a61.tar.gz
nixlib-c8d05d8abadb244bc4e6cee75d450978d1f09a61.tar.bz2
nixlib-c8d05d8abadb244bc4e6cee75d450978d1f09a61.tar.lz
nixlib-c8d05d8abadb244bc4e6cee75d450978d1f09a61.tar.xz
nixlib-c8d05d8abadb244bc4e6cee75d450978d1f09a61.tar.zst
nixlib-c8d05d8abadb244bc4e6cee75d450978d1f09a61.zip
Merge branch 'nixos-unstable-small' of https://github.com/NixOS/nixpkgs
Diffstat (limited to 'nixpkgs/lib')
-rw-r--r--nixpkgs/lib/customisation.nix6
-rw-r--r--nixpkgs/lib/systems/inspect.nix3
2 files changed, 8 insertions, 1 deletions
diff --git a/nixpkgs/lib/customisation.nix b/nixpkgs/lib/customisation.nix
index c233744e07ca..0b5cad71fddf 100644
--- a/nixpkgs/lib/customisation.nix
+++ b/nixpkgs/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
diff --git a/nixpkgs/lib/systems/inspect.nix b/nixpkgs/lib/systems/inspect.nix
index 073df78797c7..5e5e92699e44 100644
--- a/nixpkgs/lib/systems/inspect.nix
+++ b/nixpkgs/lib/systems/inspect.nix
@@ -98,6 +98,9 @@ rec {
       { cpu = { family = "riscv"; }; }
       { cpu = { family = "x86"; }; }
     ];
+
+    isElf          = { kernel.execFormat = execFormats.elf; };
+    isMacho        = { kernel.execFormat = execFormats.macho; };
   };
 
   # given two patterns, return a pattern which is their logical AND.