1 { stdenvNoCC, lib, glibc, musl }:
5 if stdenvNoCC.targetPlatform.isMusl
9 if stdenvNoCC.targetPlatform.isMusl
10 then "musl-${libc.version}/include/elf.h"
11 else "glibc-${libc.version}/elf/elf.h";
14 stdenvNoCC.mkDerivation {
16 inherit (libc) version;
25 mkdir -p "$out/include";
27 ${lib.escapeShellArg libc.src} \
28 ${lib.escapeShellArg headerPath} \
30 | sed -e '/features\.h/d' \
31 > "$out/include/elf.h"
35 outputsToInstall = [ "out" ];
36 description = "The datastructures of ELF according to the target platform's libc";
38 The Executable and Linkable Format (ELF, formerly named Extensible Linking
39 Format), is usually defined in a header like this.
41 platforms = lib.platforms.all;
42 maintainers = [ lib.maintainers.ericson2314 ];