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.
This commit is contained in:
Ryan Burns 2021-10-17 20:48:47 -07:00
parent ee291783e5
commit 5cbd74e49a

View file

@ -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.