Skip to content

Commit be18173

Browse files
committed
llvmPackages_22.libc: fix by using hdrgen unconditionally
1 parent c3042f1 commit be18173

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

pkgs/development/compilers/llvm/common/libc/default.nix

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ let
3131
cp -r ${monorepoSrc}/third-party "$out"
3232
''
3333
);
34+
35+
needHdrGen = isFullBuild || lib.versionAtLeast release_version "22";
3436
in
3537
stdenv.mkDerivation (finalAttrs: {
3638
inherit pname version patches;
@@ -44,13 +46,13 @@ stdenv.mkDerivation (finalAttrs: {
4446
python3
4547
ninja
4648
]
47-
++ (lib.optional isFullBuild python3Packages.pyyaml);
49+
++ (lib.optional needHdrGen python3Packages.pyyaml);
4850

4951
buildInputs = lib.optional (isFullBuild && stdenv.hostPlatform.isLinux) linuxHeaders;
5052

5153
outputs = [ "out" ] ++ (lib.optional isFullBuild "dev");
5254

53-
postUnpack = lib.optionalString isFullBuild ''
55+
postUnpack = lib.optionalString needHdrGen ''
5456
chmod +w $sourceRoot/../$pname/utils/hdrgen
5557
patchShebangs $sourceRoot/../$pname/utils/hdrgen/main.py
5658
chmod +x $sourceRoot/../$pname/utils/hdrgen/main.py

0 commit comments

Comments
 (0)