lol

Merge pull request #210325 from amjoseph-nixpkgs/pr/glibc/proper-overrides

authored by

Artturi and committed by
GitHub
956e4aa2 c3156375

+11 -14
+1 -6
pkgs/development/libraries/glibc/common.nix
··· 37 37 , profilingLibraries ? false 38 38 , withGd ? false 39 39 , withLibcrypt ? false 40 - , meta 41 40 , extraBuildInputs ? [] 42 41 , extraNativeBuildInputs ? [] 43 42 , ... ··· 264 263 265 264 maintainers = with maintainers; [ eelco ma27 ]; 266 265 platforms = platforms.linux; 267 - } // meta; 268 - } 269 - 270 - // lib.optionalAttrs (stdenv.hostPlatform != stdenv.buildPlatform) { 271 - preInstall = null; # clobber the native hook 266 + } // (args.meta or {}); 272 267 })
+10 -8
pkgs/development/libraries/glibc/default.nix
··· 14 14 ]; 15 15 in 16 16 17 - callPackage ./common.nix { inherit stdenv; } { 18 - pname = "glibc" + lib.optionalString withGd "-gd"; 19 - 20 - inherit withLinuxHeaders profilingLibraries withGd withLibcrypt; 17 + (callPackage ./common.nix { inherit stdenv; } { 18 + inherit withLinuxHeaders withGd profilingLibraries withLibcrypt; 19 + pname = "glibc" + lib.optionalString withGd "-gd"; 20 + }).overrideAttrs(previousAttrs: { 21 21 22 22 # Note: 23 23 # Things you write here override, and do not add to, 24 24 # the values in `common.nix`. 25 25 # (For example, if you define `patches = [...]` here, it will 26 - # override the patches in `common.nix`.) 26 + # override the patches in `common.nix` -- so instead you should 27 + # write `patches = (previousAttrs.patches or []) ++ [ ... ]`. 27 28 28 29 NIX_NO_SELF_RPATH = true; 29 30 ··· 74 75 # - dejagnu: during linux bootstrap tcl SIGSEGVs 75 76 # - clang-wrapper in cross-compilation 76 77 # Last attempt: https://github.com/NixOS/nixpkgs/pull/36948 77 - preInstall = '' 78 + preInstall = lib.optionalString (stdenv.hostPlatform == stdenv.buildPlatform) '' 78 79 if [ -f ${stdenv.cc.cc}/lib/libgcc_s.so.1 ]; then 79 80 mkdir -p $out/lib 80 81 cp ${stdenv.cc.cc}/lib/libgcc_s.so.1 $out/lib/libgcc_s.so.1 ··· 153 154 154 155 separateDebugInfo = true; 155 156 156 - meta.description = "The GNU C Library"; 157 - } 157 + meta = (previousAttrs.meta or {}) // { description = "The GNU C Library"; }; 158 + }) 159 +