From 5cbd74e49a94692ce5582506966789e60a27363e Mon Sep 17 00:00:00 2001 From: Ryan Burns Date: Sun, 17 Oct 2021 20:48:47 -0700 Subject: [PATCH] lib/systems: add exec format inspection attrs Most of the time when we do a patchelf conditional on hostPlatform.isLinux, what we really mean is hostPlatform.isElf. Now that we are starting to support BSDs, this is becoming more important. --- lib/systems/inspect.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/systems/inspect.nix b/lib/systems/inspect.nix index 073df78797c7..5e5e92699e44 100644 --- a/lib/systems/inspect.nix +++ b/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.