···34 preFixup = ''
35 for f in `find $out/lib/sane/ -type f`; do
36 # Make it possible to find libstdc++.so.6
37- patchelf --set-rpath ${stdenv.cc.cc.lib}/lib:$out/lib/sane $f
3839 # Horrible kludge: The driver hardcodes /usr/lib/sane/ as a dlopen path.
40 # We can directly modify the binary to force a relative lookup instead.
···34 preFixup = ''
35 for f in `find $out/lib/sane/ -type f`; do
36 # Make it possible to find libstdc++.so.6
37+ patchelf --set-rpath ${lib.getLib stdenv.cc.cc}/lib:$out/lib/sane $f
3839 # Horrible kludge: The driver hardcodes /usr/lib/sane/ as a dlopen path.
40 # We can directly modify the binary to force a relative lookup instead.
+1-1
pkgs/applications/kde/kdevelop/kdevelop.nix
···35 # https://cgit.kde.org/kdevelop.git/commit/?id=716372ae2e8dff9c51e94d33443536786e4bd85b
36 # required as nixos seems to be unable to find CLANG_BUILTIN_DIR
37 cmakeFlags = [
38- "-DCLANG_BUILTIN_DIR=${llvmPackages.libclang.lib}/lib/clang/${lib.getVersion llvmPackages.clang}/include"
39 ];
4041 dontWrapQtApps = true;
···35 # https://cgit.kde.org/kdevelop.git/commit/?id=716372ae2e8dff9c51e94d33443536786e4bd85b
36 # required as nixos seems to be unable to find CLANG_BUILTIN_DIR
37 cmakeFlags = [
38+ "-DCLANG_BUILTIN_DIR=${lib.getLib llvmPackages.libclang}/lib/clang/${lib.getVersion llvmPackages.clang}/include"
39 ];
4041 dontWrapQtApps = true;
···35 postFixup = ''
36 for file in $(find $out -type f -type f -perm /0111); do
37 old_rpath=$(patchelf --print-rpath $file) && \
38- patchelf --set-rpath $old_rpath:${stdenv.cc.cc.lib}/lib $file || true
39 done
40 # Link to the master program
41 ln -s $out/bin/quast.py $out/bin/quast
···35 postFixup = ''
36 for file in $(find $out -type f -type f -perm /0111); do
37 old_rpath=$(patchelf --print-rpath $file) && \
38+ patchelf --set-rpath $old_rpath:${lib.getLib stdenv.cc.cc}/lib $file || true
39 done
40 # Link to the master program
41 ln -s $out/bin/quast.py $out/bin/quast
···64 # nix provide lib/clang headers in libclang, not in llvm.
65 substituteInPlace casadi/interfaces/clang/CMakeLists.txt --replace-fail \
66 '$'{CLANG_LLVM_LIB_DIR} \
67- ${llvmPackages_17.libclang.lib}/lib
6869 # help casadi find its own libs
70 substituteInPlace casadi/core/casadi_os.cpp --replace-fail \
···64 # nix provide lib/clang headers in libclang, not in llvm.
65 substituteInPlace casadi/interfaces/clang/CMakeLists.txt --replace-fail \
66 '$'{CLANG_LLVM_LIB_DIR} \
67+ ${lib.getLib llvmPackages_17.libclang}/lib
6869 # help casadi find its own libs
70 substituteInPlace casadi/core/casadi_os.cpp --replace-fail \
+1-1
pkgs/by-name/cc/ccache/package.nix
···122 isGNU = unwrappedCC.isGNU or false;
123 isCcache = true;
124 };
125- inherit (unwrappedCC) lib;
126 nativeBuildInputs = [ makeWrapper ];
127 # Unwrapped clang does not have a targetPrefix because it is multi-target
128 # target is decided with argv0.
···122 isGNU = unwrappedCC.isGNU or false;
123 isCcache = true;
124 };
125+ lib = lib.getLib unwrappedCC;
126 nativeBuildInputs = [ makeWrapper ];
127 # Unwrapped clang does not have a targetPrefix because it is multi-target
128 # target is decided with argv0.
+1-1
pkgs/by-name/ch/chatd/package.nix
···37 ] ++ lib.optional stdenv.isLinux autoPatchelfHook; # for onnx libs
3839 buildInputs = [
40- stdenv.cc.cc.lib # for libstdc++.so, required by onnxruntime
41 vips # or it will try to download from the Internet
42 ];
43
···37 ] ++ lib.optional stdenv.isLinux autoPatchelfHook; # for onnx libs
3839 buildInputs = [
40+ (lib.getLib stdenv.cc.cc) # for libstdc++.so, required by onnxruntime
41 vips # or it will try to download from the Internet
42 ];
43
+1-1
pkgs/by-name/dy/dyalog/package.nix
···76 ];
7778 buildInputs = [
79- stdenv.cc.cc.lib # Used by Conga and .NET Bridge
80 ncurses5 # Used by the dyalog binary to correctly display in the terminal
81 ]
82 ++ lib.optionals htmlRendererSupport [
···76 ];
7778 buildInputs = [
79+ (lib.getLib stdenv.cc.cc) # Used by Conga and .NET Bridge
80 ncurses5 # Used by the dyalog binary to correctly display in the terminal
81 ]
82 ++ lib.optionals htmlRendererSupport [
···215 # one that is compatible with the rest of nixpkgs, even when
216 # nvcc forces us to use an older gcc
217 # NB: We don't actually know if this is the right thing to do
218- stdenv.cc.cc.lib
219 ];
220221 # Picked up by autoPatchelf
···215 # one that is compatible with the rest of nixpkgs, even when
216 # nvcc forces us to use an older gcc
217 # NB: We don't actually know if this is the right thing to do
218+ (lib.getLib stdenv.cc.cc)
219 ];
220221 # Picked up by autoPatchelf
···189 lib.optionals stdenv.hostPlatform.isLinux [ autoPatchelfHook ]
190 ++ lib.optionals cudaSupport [ autoAddDriverRunpath ];
191 # Dynamic link dependencies
192- buildInputs = [ stdenv.cc.cc.lib ];
193194 # jaxlib contains shared libraries that open other shared libraries via dlopen
195 # and these implicit dependencies are not recognized by ldd or
···189 lib.optionals stdenv.hostPlatform.isLinux [ autoPatchelfHook ]
190 ++ lib.optionals cudaSupport [ autoAddDriverRunpath ];
191 # Dynamic link dependencies
192+ buildInputs = [ (lib.getLib stdenv.cc.cc) ];
193194 # jaxlib contains shared libraries that open other shared libraries via dlopen
195 # and these implicit dependencies are not recognized by ldd or
···7980 # "Couldn't find libclang.dylib You will likely need to add it manually to PATH to ensure the build succeeds."
81 env = lib.optionalAttrs stdenv.hostPlatform.isDarwin {
82- LLVM_INSTALL_DIR = "${llvmPackages.libclang.lib}/lib";
83 };
8485 nativeBuildInputs = [
···7980 # "Couldn't find libclang.dylib You will likely need to add it manually to PATH to ensure the build succeeds."
81 env = lib.optionalAttrs stdenv.hostPlatform.isDarwin {
82+ LLVM_INSTALL_DIR = "${lib.getLib llvmPackages.libclang}/lib";
83 };
8485 nativeBuildInputs = [
···112 for variant in "" "-ncurses5" "-ncurses6"; do
113 autoPatchelfInJar \
114 $out/lib/gradle/lib/native-platform-linux-${arch}$variant-''${nativeVersion}.jar \
115- "${stdenv.cc.cc.lib}/lib64:${lib.makeLibraryPath [ stdenv.cc.cc ncurses5 ncurses6 ]}"
116 done
117118 # The file-events library _seems_ to follow the native-platform version, but
···120 fileEventsVersion="$(extractVersion file-events $out/lib/gradle/lib/file-events-*.jar)"
121 autoPatchelfInJar \
122 $out/lib/gradle/lib/file-events-linux-${arch}-''${fileEventsVersion}.jar \
123- "${stdenv.cc.cc.lib}/lib64:${lib.makeLibraryPath [ stdenv.cc.cc ]}"
124125 # The scanner doesn't pick up the runtime dependency in the jar.
126 # Manually add a reference where it will be found.
···112 for variant in "" "-ncurses5" "-ncurses6"; do
113 autoPatchelfInJar \
114 $out/lib/gradle/lib/native-platform-linux-${arch}$variant-''${nativeVersion}.jar \
115+ "${lib.getLib stdenv.cc.cc}/lib64:${lib.makeLibraryPath [ stdenv.cc.cc ncurses5 ncurses6 ]}"
116 done
117118 # The file-events library _seems_ to follow the native-platform version, but
···120 fileEventsVersion="$(extractVersion file-events $out/lib/gradle/lib/file-events-*.jar)"
121 autoPatchelfInJar \
122 $out/lib/gradle/lib/file-events-linux-${arch}-''${fileEventsVersion}.jar \
123+ "${lib.getLib stdenv.cc.cc}/lib64:${lib.makeLibraryPath [ stdenv.cc.cc ]}"
124125 # The scanner doesn't pick up the runtime dependency in the jar.
126 # Manually add a reference where it will be found.
···101 substituteInPlace hotdoc/extensions/c/c_extension.py \
102 --replace "shutil.which('llvm-config')" 'True' \
103 --replace "subprocess.check_output(['llvm-config', '--version']).strip().decode()" '"${lib.versions.major llvmPackages.libclang.version}"' \
104- --replace "subprocess.check_output(['llvm-config', '--prefix']).strip().decode()" '"${llvmPackages.libclang.lib}"' \
105- --replace "subprocess.check_output(['llvm-config', '--libdir']).strip().decode()" '"${llvmPackages.libclang.lib}/lib"'
106 '';
107108 # Make pytest run from a temp dir to have it pick up installed package for cmark
···101 substituteInPlace hotdoc/extensions/c/c_extension.py \
102 --replace "shutil.which('llvm-config')" 'True' \
103 --replace "subprocess.check_output(['llvm-config', '--version']).strip().decode()" '"${lib.versions.major llvmPackages.libclang.version}"' \
104+ --replace "subprocess.check_output(['llvm-config', '--prefix']).strip().decode()" '"${lib.getLib llvmPackages.libclang}"' \
105+ --replace "subprocess.check_output(['llvm-config', '--libdir']).strip().decode()" '"${lib.getLib llvmPackages.libclang}/lib"'
106 '';
107108 # Make pytest run from a temp dir to have it pick up installed package for cmark
···15 # $debugdir:$datadir/auto-load are whitelisted by default by GDB
16 "$debugdir" "$datadir/auto-load"
17 # targetPackages so we get the right libc when cross-compiling and using buildPackages.gdb
18- targetPackages.stdenv.cc.cc.lib
19 ]
20, writeScript
21}:
···15 # $debugdir:$datadir/auto-load are whitelisted by default by GDB
16 "$debugdir" "$datadir/auto-load"
17 # targetPackages so we get the right libc when cross-compiling and using buildPackages.gdb
18+ (lib.getLib targetPackages.stdenv.cc.cc)
19 ]
20, writeScript
21}:
···43 mkdir -p $out/{opt/andyetitmoves,bin}
44 cp -r * $out/opt/andyetitmoves/
4546- fullPath=${stdenv.cc.cc.lib}/lib64
47 for i in $nativeBuildInputs; do
48 fullPath=$fullPath''${fullPath:+:}$i/lib
49 done
···43 mkdir -p $out/{opt/andyetitmoves,bin}
44 cp -r * $out/opt/andyetitmoves/
4546+ fullPath=${lib.getLib stdenv.cc.cc}/lib64
47 for i in $nativeBuildInputs; do
48 fullPath=$fullPath''${fullPath:+:}$i/lib
49 done
+1-1
pkgs/games/arena/default.nix
···21 };
2223 # stdenv.cc.cc.lib is in that list to pick up libstdc++.so. Is there a better way?
24- buildInputs = [gtk2-x11 glib pango cairo atk gdk-pixbuf libX11 stdenv.cc.cc.lib];
2526 unpackPhase = ''
27 # This is is a tar bomb, i.e. it extract a dozen files and directories to
···21 };
2223 # stdenv.cc.cc.lib is in that list to pick up libstdc++.so. Is there a better way?
24+ buildInputs = [gtk2-x11 glib pango cairo atk gdk-pixbuf libX11 (lib.getLib stdenv.cc.cc)];
2526 unpackPhase = ''
27 # This is is a tar bomb, i.e. it extract a dozen files and directories to
+1-1
pkgs/games/clonehero/default.nix
···38 # Load-time libraries (loaded from DT_NEEDED section in ELF binary)
39 alsa-lib
40 gtk3
41- stdenv.cc.cc.lib
42 zlib
4344 # Run-time libraries (loaded with dlopen)
···38 # Load-time libraries (loaded from DT_NEEDED section in ELF binary)
39 alsa-lib
40 gtk3
41+ (lib.getLib stdenv.cc.cc)
42 zlib
4344 # Run-time libraries (loaded with dlopen)
···385 # for the version, look for the driver of XP-750 in the search page
386 version = "2.30.4";
387388- buildInputs = [ stdenv.cc.cc.lib ];
389 nativeBuildInputs = [ autoPatchelfHook ];
390391 src = fetchurl {
···385 # for the version, look for the driver of XP-750 in the search page
386 version = "2.30.4";
387388+ buildInputs = [ (lib.getLib stdenv.cc.cc) ];
389 nativeBuildInputs = [ autoPatchelfHook ];
390391 src = fetchurl {