treewide: use getLib when accessing clang / libclang / stdenv.cc.cc (#354197)

This commit is contained in:
Emily 2024-11-07 18:16:05 +00:00 committed by GitHub
commit 3a6d4d006a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
233 changed files with 289 additions and 289 deletions

View File

@ -28,7 +28,7 @@ in {
networking.interfaces.eth1.ipv4.addresses = [ { address = serverAddress; prefixLength = 24; } ];
services.openssh.enable = true;
users.users.root.openssh.authorizedKeys.keys = [ snakeOilPublicKey ];
virtualisation.additionalPaths = with pkgs; [ patchelf bintools stdenv.cc.cc.lib ];
virtualisation.additionalPaths = with pkgs; [ patchelf bintools (lib.getLib stdenv.cc.cc) ];
};
client = { ... }: {
imports = [ ./common/x11.nix ./common/user-account.nix ];

View File

@ -24,7 +24,7 @@ stdenv.mkDerivation rec {
dontWrapGApps = true; # we only want $gappsWrapperArgs here
buildInputs = with xorg; [
alsa-lib cairo freetype gdk-pixbuf glib gtk3 libxcb xcbutil xcbutilwm zlib libXtst libxkbcommon pulseaudio libjack2 libX11 libglvnd libXcursor stdenv.cc.cc.lib
alsa-lib cairo freetype gdk-pixbuf glib gtk3 libxcb xcbutil xcbutilwm zlib libXtst libxkbcommon pulseaudio libjack2 libX11 libglvnd libXcursor (lib.getLib stdenv.cc.cc)
];
ldLibraryPath = lib.strings.makeLibraryPath buildInputs;

View File

@ -59,7 +59,7 @@ stdenv.mkDerivation rec {
libxkbcommon
pipewire
pulseaudio
stdenv.cc.cc.lib
(lib.getLib stdenv.cc.cc)
xcbutil
xcbutilwm
zlib

View File

@ -67,7 +67,7 @@ stdenv.mkDerivation rec {
pango
pipewire
pulseaudio
stdenv.cc.cc.lib
(lib.getLib stdenv.cc.cc)
vulkan-loader
xcb-imdkit
xcbutil

View File

@ -30,7 +30,7 @@ buildDotnetModule rec {
graphicsmagick
];
buildInputs = [ stdenv.cc.cc.lib fontconfig ];
buildInputs = [ (lib.getLib stdenv.cc.cc) fontconfig ];
runtimeDeps = [
libglvnd

View File

@ -23,7 +23,7 @@ stdenv.mkDerivation rec {
libXext # libXext.so.6
alsa-lib # libasound.so.2
freetype # libfreetype.so.6
stdenv.cc.cc.lib # libstdc++.so.6
(lib.getLib stdenv.cc.cc) # libstdc++.so.6
];
in ''
patchelf \

View File

@ -45,7 +45,7 @@ let
];
buildInputs = [
stdenv.cc.cc.lib
(lib.getLib stdenv.cc.cc)
xorg.libX11 # libX11.so.6
xorg.libXext # libXext.so.6
alsa-lib # libasound.so.2

View File

@ -51,7 +51,7 @@ stdenv.mkDerivation rec {
sourceRoot = lib.optionalString stdenv.hostPlatform.isDarwin "Reaper.app";
buildInputs = [
stdenv.cc.cc.lib # reaper and libSwell need libstdc++.so.6
(lib.getLib stdenv.cc.cc) # reaper and libSwell need libstdc++.so.6
] ++ lib.optionals stdenv.hostPlatform.isLinux [
gtk3
alsa-lib
@ -88,7 +88,7 @@ stdenv.mkDerivation rec {
# We opt for wrapping the executable with LD_LIBRARY_PATH prefix.
# Note that libcurl and libxml2 are needed for ReaPack to run.
wrapProgram $out/opt/REAPER/reaper \
--prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ curl lame libxml2 ffmpeg vlc xdotool stdenv.cc.cc.lib ]}"
--prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ curl lame libxml2 ffmpeg vlc xdotool stdenv.cc.cc ]}"
mkdir $out/bin
ln -s $out/opt/REAPER/reaper $out/bin/

View File

@ -36,7 +36,7 @@ stdenv.mkDerivation rec {
libX11
libXext
alsa-lib
stdenv.cc.cc.lib
(lib.getLib stdenv.cc.cc)
];
installPhase = ''

View File

@ -73,7 +73,7 @@ in stdenv.mkDerivation rec {
ln -s $path/lib/*.so* $out/lib/
done
ln -s ${stdenv.cc.cc.lib}/lib/libstdc++.so.6 $out/lib/
ln -s ${lib.getLib stdenv.cc.cc}/lib/libstdc++.so.6 $out/lib/
mkdir $out/bin
ln -s $out/renoise $out/bin/renoise

View File

@ -13,7 +13,7 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ autoPatchelfHook makeWrapper ];
buildInputs = [ alsa-lib curl gtk3 stdenv.cc.cc.lib webkitgtk_4_0 zenity ];
buildInputs = [ alsa-lib curl gtk3 (lib.getLib stdenv.cc.cc) webkitgtk_4_0 zenity ];
installPhase = ''
mkdir -p "$out/bin"

View File

@ -30,7 +30,7 @@ stdenv.mkDerivation rec {
];
buildInputs = [
stdenv.cc.cc.lib
(lib.getLib stdenv.cc.cc)
alsa-lib
freetype
libglvnd

View File

@ -29,7 +29,7 @@ stdenv.mkDerivation rec {
];
buildInputs = [
stdenv.cc.cc.lib
(lib.getLib stdenv.cc.cc)
alsa-lib
freetype
libglvnd

View File

@ -27,7 +27,7 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ autoPatchelfHook dpkg ];
buildInputs = [
stdenv.cc.cc.lib
(lib.getLib stdenv.cc.cc)
alsa-lib
freetype
libglvnd

View File

@ -27,7 +27,7 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ autoPatchelfHook dpkg ];
buildInputs = [
stdenv.cc.cc.lib
(lib.getLib stdenv.cc.cc)
alsa-lib
freetype
libglvnd

View File

@ -30,7 +30,7 @@ stdenv.mkDerivation rec {
];
buildInputs = [
stdenv.cc.cc.lib
(lib.getLib stdenv.cc.cc)
alsa-lib
freetype
libglvnd

View File

@ -71,7 +71,7 @@ stdenv.mkDerivation rec {
];
buildInputs = [
stdenv.cc.cc.lib
(lib.getLib stdenv.cc.cc)
alsa-lib
];

View File

@ -22,7 +22,7 @@ stdenv.mkDerivation rec {
];
buildInputs = [
stdenv.cc.cc.lib
(lib.getLib stdenv.cc.cc)
libX11
libXi
libGL

View File

@ -28,7 +28,7 @@ stdenv.mkDerivation (finalAttrs: {
buildInputs = [
alsa-lib
stdenv.cc.cc.lib
(lib.getLib stdenv.cc.cc)
libGL
xorg.libSM
xorg.libICE

View File

@ -136,7 +136,7 @@ let
sparrow-modules = stdenvNoCC.mkDerivation {
pname = "sparrow-modules";
inherit version src;
nativeBuildInputs = [ makeWrapper gzip gnugrep openjdk autoPatchelfHook stdenv.cc.cc.lib zlib ];
nativeBuildInputs = [ makeWrapper gzip gnugrep openjdk autoPatchelfHook (lib.getLib stdenv.cc.cc) zlib ];
buildPhase = ''
# Extract Sparrow's JIMAGE and generate a list of them.

View File

@ -50,7 +50,7 @@ stdenv.mkDerivation rec {
# patch pre-built node modules
asar e $out/share/${pname}/resources/app.asar asar-unpacked
find asar-unpacked -name '*.node' -exec patchelf \
--add-rpath "${lib.makeLibraryPath [ stdenv.cc.cc.lib ]}" \
--add-rpath "${lib.makeLibraryPath [ stdenv.cc.cc ]}" \
{} \;
asar p asar-unpacked $out/share/${pname}/resources/app.asar

View File

@ -25,7 +25,7 @@ buildDotnetModule rec {
dotnet-sdk = dotnetCorePackages.sdk_7_0;
dotnet-runtime = dotnetCorePackages.aspnetcore_7_0;
buildInputs = [stdenv.cc.cc.lib zlib];
buildInputs = [(lib.getLib stdenv.cc.cc) zlib];
runtimeDeps = [openssl zlib];

View File

@ -16,7 +16,7 @@ let
runtimeLibs = [
fontconfig.lib
openssl
stdenv.cc.cc.lib
(lib.getLib stdenv.cc.cc)
xorg.libX11
xorg.libICE
xorg.libSM

View File

@ -137,7 +137,7 @@ let
e2fsprogs
# Gradle wants libstdc++.so.6
stdenv.cc.cc.lib
(lib.getLib stdenv.cc.cc)
# mksdcard wants 32 bit libstdc++.so.6
pkgsi686Linux.stdenv.cc.cc.lib

View File

@ -153,8 +153,8 @@ let
# https://github.com/Golevka/emacs-clang-complete-async/issues/90
auto-complete-clang-async = (addPackageRequires super.auto-complete-clang-async [ self.auto-complete ]).overrideAttrs (old: {
buildInputs = old.buildInputs ++ [ pkgs.llvmPackages.llvm ];
CFLAGS = "-I${pkgs.llvmPackages.libclang.lib}/include";
LDFLAGS = "-L${pkgs.llvmPackages.libclang.lib}/lib";
CFLAGS = "-I${lib.getLib pkgs.llvmPackages.libclang}/include";
LDFLAGS = "-L${lib.getLib pkgs.llvmPackages.libclang}/lib";
});
# part of a larger package

View File

@ -5,17 +5,17 @@
"631" = {
# Python
nativeBuildInputs = lib.optional stdenv.hostPlatform.isLinux autoPatchelfHook;
buildInputs = [ stdenv.cc.cc.lib ];
buildInputs = [ (lib.getLib stdenv.cc.cc) ];
};
"7322" = {
# Python community edition
nativeBuildInputs = lib.optional stdenv.hostPlatform.isLinux autoPatchelfHook;
buildInputs = [ stdenv.cc.cc.lib ];
buildInputs = [ (lib.getLib stdenv.cc.cc) ];
};
"8182" = {
# Rust (deprecated)
nativeBuildInputs = lib.optional stdenv.hostPlatform.isLinux autoPatchelfHook;
buildInputs = [ stdenv.cc.cc.lib ];
buildInputs = [ (lib.getLib stdenv.cc.cc) ];
buildPhase = ''
runHook preBuild
chmod +x -R bin
@ -66,7 +66,7 @@
"22407" = {
# Rust
nativeBuildInputs = lib.optional stdenv.hostPlatform.isLinux autoPatchelfHook;
buildInputs = [ stdenv.cc.cc.lib ];
buildInputs = [ (lib.getLib stdenv.cc.cc) ];
buildPhase = ''
runHook preBuild
chmod +x -R bin

View File

@ -146,8 +146,8 @@ in
--replace-fail '@node@' ${nodejs}
substituteInPlace src/cpp/core/libclang/LibClang.cpp \
--replace-fail '@libclang@' ${llvmPackages.libclang.lib} \
--replace-fail '@libclang.so@' ${llvmPackages.libclang.lib}/lib/libclang.so
--replace-fail '@libclang@' ${lib.getLib llvmPackages.libclang} \
--replace-fail '@libclang.so@' ${lib.getLib llvmPackages.libclang}/lib/libclang.so
substituteInPlace src/cpp/session/CMakeLists.txt \
--replace-fail '@pandoc@' ${pandoc} \

View File

@ -39,7 +39,7 @@ stdenv.mkDerivation rec {
libPath = lib.makeLibraryPath [
libsecret
glib
stdenv.cc.cc.lib
(lib.getLib stdenv.cc.cc)
];
in
''

View File

@ -36,7 +36,7 @@ stdenv.mkDerivation rec {
echo ${libPath}
patchelf \
--interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
--set-rpath ${libPath}:${stdenv.cc.cc.lib}/lib${lib.optionalString stdenv.hostPlatform.is64bit "64"} \
--set-rpath ${libPath}:${lib.getLib stdenv.cc.cc}/lib${lib.optionalString stdenv.hostPlatform.is64bit "64"} \
$out/sublime/sublime_text
mkdir -p $out/share/icons

View File

@ -65,7 +65,7 @@ let
for binary in ${ builtins.concatStringsSep " " binaries }; do
patchelf \
--interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
--set-rpath ${libPath}:${stdenv.cc.cc.lib}/lib${lib.optionalString stdenv.hostPlatform.is64bit "64"} \
--set-rpath ${libPath}:${lib.getLib stdenv.cc.cc}/lib${lib.optionalString stdenv.hostPlatform.is64bit "64"} \
$binary
done
@ -92,7 +92,7 @@ let
postFixup = ''
wrapProgram $out/sublime_bash \
--set LD_PRELOAD "${stdenv.cc.cc.lib}/lib${lib.optionalString stdenv.hostPlatform.is64bit "64"}/libgcc_s.so.1"
--set LD_PRELOAD "${lib.getLib stdenv.cc.cc}/lib${lib.optionalString stdenv.hostPlatform.is64bit "64"}/libgcc_s.so.1"
wrapProgram $out/${primaryBinary} \
--set LD_PRELOAD "${libredirect}/lib/libredirect.so" \
@ -101,7 +101,7 @@ let
"''${gappsWrapperArgs[@]}"
# Without this, plugin_host crashes, even though it has the rpath
wrapProgram $out/plugin_host --prefix LD_PRELOAD : ${stdenv.cc.cc.lib}/lib${lib.optionalString stdenv.hostPlatform.is64bit "64"}/libgcc_s.so.1:${lib.getLib openssl}/lib/libssl.so:${bzip2.out}/lib/libbz2.so
wrapProgram $out/plugin_host --prefix LD_PRELOAD : ${lib.getLib stdenv.cc.cc}/lib${lib.optionalString stdenv.hostPlatform.is64bit "64"}/libgcc_s.so.1:${lib.getLib openssl}/lib/libssl.so:${bzip2.out}/lib/libbz2.so
'';
};
in stdenv.mkDerivation (rec {

View File

@ -88,7 +88,7 @@ let
for binary in ${builtins.concatStringsSep " " binaries}; do
patchelf \
--interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
--set-rpath ${lib.makeLibraryPath neededLibraries}:${stdenv.cc.cc.lib}/lib${lib.optionalString stdenv.hostPlatform.is64bit "64"} \
--set-rpath ${lib.makeLibraryPath neededLibraries}:${lib.getLib stdenv.cc.cc}/lib${lib.optionalString stdenv.hostPlatform.is64bit "64"} \
$binary
done

View File

@ -293,7 +293,7 @@ in
--replace "let g:clang_library_path = ''
+ "''"
+ ''
" "let g:clang_library_path='${llvmPackages.libclang.lib}/lib/libclang.so'"
" "let g:clang_library_path='${lib.getLib llvmPackages.libclang}/lib/libclang.so'"
substituteInPlace "$out"/plugin/libclang.py \
--replace "/usr/lib/clang" "${llvmPackages.clang.cc}/lib/clang"
@ -302,7 +302,7 @@ in
clighter8 = super.clighter8.overrideAttrs {
preFixup = ''
sed "/^let g:clighter8_libclang_path/s|')$|${llvmPackages.clang.cc.lib}/lib/libclang.so')|" \
sed "/^let g:clighter8_libclang_path/s|')$|${lib.getLib llvmPackages.clang.cc}/lib/libclang.so')|" \
-i "$out"/plugin/clighter8.vim
'';
};

View File

@ -1072,7 +1072,7 @@ let
}
// sources.${stdenv.system};
nativeBuildInputs = lib.optionals stdenv.hostPlatform.isLinux [ autoPatchelfHook ];
buildInputs = [ stdenv.cc.cc.lib ];
buildInputs = [ (lib.getLib stdenv.cc.cc) ];
meta = {
description = "Open-source autopilot for software development - bring the power of ChatGPT to your IDE";
downloadPage = "https://marketplace.visualstudio.com/items?itemName=Continue.continue";
@ -1349,7 +1349,7 @@ let
buildInputs = [
zlib
stdenv.cc.cc.lib
(lib.getLib stdenv.cc.cc)
];
postInstall = ''
@ -3245,7 +3245,7 @@ let
// sources.${stdenv.system};
nativeBuildInputs = lib.optionals stdenv.hostPlatform.isLinux [ autoPatchelfHook ];
buildInputs = [
stdenv.cc.cc.lib
(lib.getLib stdenv.cc.cc)
zlib
];
meta = {

View File

@ -71,7 +71,7 @@ vscode-utils.buildVscodeMarketplaceExtension {
lttng-ust
libkrb5
zlib
stdenv.cc.cc.lib
(lib.getLib stdenv.cc.cc)
];
dontAutoPatchelf = isx86Linux;

View File

@ -23,7 +23,7 @@ vscode-utils.buildVscodeMarketplaceExtension {
nativeBuildInputs = lib.optionals stdenv.hostPlatform.isLinux [ autoPatchelfHook ];
buildInputs = [
stdenv.cc.cc.lib
(lib.getLib stdenv.cc.cc)
zlib
];

View File

@ -13,7 +13,7 @@ stdenv.mkDerivation rec {
};
libPath = lib.makeLibraryPath (with xorg; [
stdenv.cc.cc.lib
stdenv.cc.cc
at-spi2-core.out
gdk-pixbuf
glib

View File

@ -22,7 +22,7 @@ stdenv.mkDerivation rec {
dontBuild = true;
nativeBuildInputs = [ autoPatchelfHook makeWrapper copyDesktopItems unzip ];
buildInputs = [ stdenv.cc.cc.lib ];
buildInputs = [ (lib.getLib stdenv.cc.cc) ];
desktopItems = [
(makeDesktopItem {

View File

@ -71,7 +71,7 @@ stdenv.mkDerivation rec {
];
buildInputs = [
stdenv.cc.cc.lib
(lib.getLib stdenv.cc.cc)
alsa-lib
gstreamer
gst-plugins-base

View File

@ -37,7 +37,7 @@ let
xorg.libXrandr
xorg.libXrender
xorg.libXtst
stdenv.cc.cc.lib
(lib.getLib stdenv.cc.cc)
stdenv.cc.cc
];

View File

@ -75,7 +75,7 @@ stdenv.mkDerivation (finalAttrs: {
];
buildInputs = [
stdenv.cc.cc.lib
(lib.getLib stdenv.cc.cc)
stdenv.cc
libGL
libpulseaudio
@ -129,7 +129,7 @@ stdenv.mkDerivation (finalAttrs: {
postPatch = ''
patchelf ./installer \
--set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
--set-rpath ${stdenv.cc.cc.lib}/lib
--set-rpath ${lib.getLib stdenv.cc.cc}/lib
'';
dontConfigure = true;

View File

@ -34,7 +34,7 @@ stdenv.mkDerivation rec {
preFixup = ''
for f in `find $out/lib/sane/ -type f`; do
# Make it possible to find libstdc++.so.6
patchelf --set-rpath ${stdenv.cc.cc.lib}/lib:$out/lib/sane $f
patchelf --set-rpath ${lib.getLib stdenv.cc.cc}/lib:$out/lib/sane $f
# Horrible kludge: The driver hardcodes /usr/lib/sane/ as a dlopen path.
# We can directly modify the binary to force a relative lookup instead.

View File

@ -35,7 +35,7 @@ mkDerivation rec {
# https://cgit.kde.org/kdevelop.git/commit/?id=716372ae2e8dff9c51e94d33443536786e4bd85b
# required as nixos seems to be unable to find CLANG_BUILTIN_DIR
cmakeFlags = [
"-DCLANG_BUILTIN_DIR=${llvmPackages.libclang.lib}/lib/clang/${lib.getVersion llvmPackages.clang}/include"
"-DCLANG_BUILTIN_DIR=${lib.getLib llvmPackages.libclang}/lib/clang/${lib.getVersion llvmPackages.clang}/include"
];
dontWrapQtApps = true;

View File

@ -100,7 +100,7 @@ stdenv.mkDerivation {
pango
systemd
]
+ ":${stdenv.cc.cc.lib}/lib64";
+ ":${lib.getLib stdenv.cc.cc}/lib64";
in
''
runHook preInstall

View File

@ -44,7 +44,7 @@ buildDotnetModule rec {
buildInputs = [
# Dependencies of nuget packages w/ native binaries
stdenv.cc.cc.lib
(lib.getLib stdenv.cc.cc)
fontconfig
];

View File

@ -155,7 +155,7 @@ stdenv.mkDerivation rec {
libxkbcommon
xorg.libxkbfile
pango
stdenv.cc.cc.lib
stdenv.cc.cc
systemd
])
targetPath

View File

@ -70,7 +70,7 @@ stdenv.mkDerivation (finalAttrs: {
nss
pango
systemd
stdenv.cc.cc.lib
(lib.getLib stdenv.cc.cc)
udev
xorg.libX11
xorg.libXScrnSaver

View File

@ -10,7 +10,7 @@ let
rpath = lib.makeLibraryPath
[ libX11 zlib libSM libICE libXext freetype libXrender fontconfig libXft
libXinerama stdenv.cc.cc.lib libnotify glib gtk3 libappindicator-gtk3
libXinerama stdenv.cc.cc libnotify glib gtk3 libappindicator-gtk3
curl libXfixes libXScrnSaver ];
in

View File

@ -64,7 +64,7 @@ stdenv.mkDerivation rec {
find ${src_repo}/resources/fonts -type d -execdir cp -r '{}' $out/lib/koreader/fonts \;
find $out -xtype l -print -delete
wrapProgram $out/bin/koreader --prefix LD_LIBRARY_PATH : ${
lib.makeLibraryPath [ gtk3-x11 SDL2 glib stdenv.cc.cc.lib ]
lib.makeLibraryPath [ gtk3-x11 SDL2 glib stdenv.cc.cc ]
}
'';

View File

@ -82,7 +82,7 @@
libxkbcommon
xorg.libxkbfile
pango
stdenv.cc.cc.lib
(lib.getLib stdenv.cc.cc)
systemd
];
in ''

View File

@ -384,7 +384,7 @@ buildStdenv.mkDerivation {
"--enable-default-toolkit=cairo-gtk3${lib.optionalString waylandSupport "-wayland"}"
"--enable-system-pixman"
"--with-distribution-id=org.nixos"
"--with-libclang-path=${llvmPackagesBuildBuild.libclang.lib}/lib"
"--with-libclang-path=${lib.getLib llvmPackagesBuildBuild.libclang}/lib"
"--with-system-ffi"
"--with-system-icu"
"--with-system-jpeg"

View File

@ -102,7 +102,7 @@ stdenv.mkDerivation rec {
nspr
nss
pango
stdenv.cc.cc.lib
(lib.getLib stdenv.cc.cc)
qt6.qtbase
];

View File

@ -39,7 +39,7 @@ stdenv.mkDerivation (finalAttrs: {
dbus-glib
gtk2-x11
libXt
stdenv.cc.cc.lib
(lib.getLib stdenv.cc.cc)
] ++ lib.optionals withGTK3 [
gtk3
];

View File

@ -129,7 +129,7 @@ in stdenv.mkDerivation rec {
nspr
nss
pango
stdenv.cc.cc.lib
(lib.getLib stdenv.cc.cc)
libqt5pas
qt6.qtbase
];

View File

@ -45,7 +45,7 @@ let
nativeBuildInputs = [ makeWrapper ]
++ lib.optionals stdenv.hostPlatform.isLinux [ autoPatchelfHook ];
buildInputs = lib.optionals stdenv.hostPlatform.isLinux [ stdenv.cc.cc.lib openssl protobuf zlib snappy libtirpc ];
buildInputs = lib.optionals stdenv.hostPlatform.isLinux [ (lib.getLib stdenv.cc.cc) openssl protobuf zlib snappy libtirpc ];
installPhase = ''
mkdir $out

View File

@ -72,7 +72,7 @@ stdenv.mkDerivation rec {
freetype
nspr
glib
stdenv.cc.cc.lib
stdenv.cc.cc
nss
libX11
libXrandr

View File

@ -69,7 +69,7 @@ in stdenv.mkDerivation (rec {
expat
stdenv.cc.cc
];
runtimeDependencies = [ libglvnd stdenv.cc.cc.lib (lib.getLib udev) libnotify libappindicator-gtk3 ];
runtimeDependencies = [ libglvnd (lib.getLib stdenv.cc.cc) (lib.getLib udev) libnotify libappindicator-gtk3 ];
unpackPhase = "dpkg-deb -x $src .";

View File

@ -138,7 +138,7 @@ let
xorg.libXtst
xorg.libxkbfile
xorg.libxshmfence
] + ":${stdenv.cc.cc.lib}/lib64";
] + ":${lib.getLib stdenv.cc.cc}/lib64";
buildInputs = [
gtk3 # needed for GSETTINGS_SCHEMAS_PATH

View File

@ -20,7 +20,7 @@ stdenv.mkDerivation rec {
];
NIX_LDFLAGS = ''
-L${stdenv.cc.cc.lib}/lib -lX11 -lglib-2.0 -lgtk-x11-2.0
-L${lib.getLib stdenv.cc.cc}/lib -lX11 -lglib-2.0 -lgtk-x11-2.0
-lgdk-x11-2.0 -lgdk_pixbuf-2.0 -lpango-1.0 -latk-1.0 -lcairo
-lc -lcrypto
'';

View File

@ -14,7 +14,7 @@ stdenv.mkDerivation rec {
libPath =
lib.makeLibraryPath
[ stdenv.cc stdenv.cc.cc.lib ];
[ stdenv.cc stdenv.cc.cc ];
buildCommand = ''
mkdir -p $out/bin/

View File

@ -31,7 +31,7 @@ stdenv.mkDerivation {
e2fsprogs
gmp
gtk3
stdenv.cc.cc.lib
(lib.getLib stdenv.cc.cc)
libGL
libX11
libgcrypt

View File

@ -39,7 +39,7 @@ in stdenv.mkDerivation {
libXmu
libXrandr
libXrender
stdenv.cc.cc.lib
(lib.getLib stdenv.cc.cc)
];
dontBuild = true;

View File

@ -1,4 +1,4 @@
{ stdenv, autoPatchelfHook, fetchurl, nixosTests
{ lib, stdenv, autoPatchelfHook, fetchurl, nixosTests
, metaCommon }:
let
@ -19,7 +19,7 @@ in stdenv.mkDerivation {
];
buildInputs = [
stdenv.cc.cc.lib
(lib.getLib stdenv.cc.cc)
];
patches = [

View File

@ -30,7 +30,7 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ autoPatchelfHook ];
buildInputs = [ libusb1 udev stdenv.cc.cc.lib ];
buildInputs = [ libusb1 udev (lib.getLib stdenv.cc.cc) ];
unpackPhase = ''
sh "$src" --noexec --target source

View File

@ -35,7 +35,7 @@ pythonPackages.buildPythonApplication rec {
postFixup = ''
for file in $(find $out -type f -type f -perm /0111); do
old_rpath=$(patchelf --print-rpath $file) && \
patchelf --set-rpath $old_rpath:${stdenv.cc.cc.lib}/lib $file || true
patchelf --set-rpath $old_rpath:${lib.getLib stdenv.cc.cc}/lib $file || true
done
# Link to the master program
ln -s $out/bin/quast.py $out/bin/quast

View File

@ -47,7 +47,7 @@ let
patchelf \
--set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
--set-rpath "${libPath}:$out/eagle-${version}/lib:${stdenv.cc.cc.lib}/lib" \
--set-rpath "${libPath}:$out/eagle-${version}/lib:${lib.getLib stdenv.cc.cc}/lib" \
"$out"/eagle-${version}/eagle
mkdir -p "$out"/bin

View File

@ -28,7 +28,7 @@ let
inherit (sources.libpicoipp) version;
src = fetchurl { inherit (sources.libpicoipp) url sha256; };
nativeBuildInputs = [ dpkg autoPatchelfHook ];
buildInputs = [ stdenv.cc.cc.lib ];
buildInputs = [ (lib.getLib stdenv.cc.cc) ];
sourceRoot = ".";
unpackCmd = "dpkg-deb -x $src .";
installPhase = ''

View File

@ -7,7 +7,7 @@ let
gmp4
ncurses
zlib
] + ":${stdenv.cc.cc.lib}/lib64";
] + ":${lib.getLib stdenv.cc.cc}/lib64";
url = "https://github.com/GaloisInc/saw-script/releases/download";

View File

@ -6,7 +6,7 @@ let
libPath = lib.makeLibraryPath
[ stdenv.cc.libc stdenv.cc.cc gtk2 gdk-pixbuf atk pango glib cairo
freetype fontconfig libxml2 gnome2.gtksourceview
] + ":${stdenv.cc.cc.lib}/lib64:$out/libexec";
] + ":${lib.getLib stdenv.cc.cc}/lib64:$out/libexec";
patchExe = x: ''
patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \

View File

@ -54,7 +54,7 @@ stdenv.mkDerivation rec {
ncurses
opencv4
openssl
stdenv.cc.cc.lib
(lib.getLib stdenv.cc.cc)
unixODBC
xkeyboard_config
libxml2
@ -113,15 +113,15 @@ stdenv.mkDerivation rec {
# Fix library paths
cd $out/libexec/${dirName}/Executables
for path in MathKernel math mcc wolfram; do
makeWrapper $out/libexec/${dirName}/Executables/$path $out/bin/$path --set LD_LIBRARY_PATH "${zlib}/lib:${stdenv.cc.cc.lib}/lib:${libssh2}/lib:\''${LD_LIBRARY_PATH}"
makeWrapper $out/libexec/${dirName}/Executables/$path $out/bin/$path --set LD_LIBRARY_PATH "${zlib}/lib:${lib.getLib stdenv.cc.cc}/lib:${libssh2}/lib:\''${LD_LIBRARY_PATH}"
done
for path in WolframKernel wolframscript; do
makeWrapper $out/libexec/${dirName}/SystemFiles/Kernel/Binaries/Linux-x86-64/$path $out/bin/$path --set LD_LIBRARY_PATH "${zlib}/lib:${stdenv.cc.cc.lib}/lib:${libssh2}/lib:\''${LD_LIBRARY_PATH}"
makeWrapper $out/libexec/${dirName}/SystemFiles/Kernel/Binaries/Linux-x86-64/$path $out/bin/$path --set LD_LIBRARY_PATH "${zlib}/lib:${lib.getLib stdenv.cc.cc}/lib:${libssh2}/lib:\''${LD_LIBRARY_PATH}"
done
wrapQtApp "$out/libexec/${dirName}/SystemFiles/FrontEnd/Binaries/Linux-x86-64/WolframPlayer" \
--set LD_LIBRARY_PATH "${zlib}/lib:${stdenv.cc.cc.lib}/lib:${libssh2}/lib:\''${LD_LIBRARY_PATH}" \
--set LD_LIBRARY_PATH "${zlib}/lib:${lib.getLib stdenv.cc.cc}/lib:${libssh2}/lib:\''${LD_LIBRARY_PATH}" \
--set QT_XKB_CONFIG_ROOT "${xkeyboard_config}/share/X11/xkb"
if ! isELF "$out/libexec/${dirName}/SystemFiles/FrontEnd/Binaries/Linux-x86-64/WolframPlayer"; then
substituteInPlace $out/libexec/${dirName}/SystemFiles/FrontEnd/Binaries/Linux-x86-64/WolframPlayer \

View File

@ -51,7 +51,7 @@ let
nativeBuildInputs = [ autoPatchelfHook ];
buildInputs = [
stdenv.cc.cc.lib
(lib.getLib stdenv.cc.cc)
gtk2
pango
cairo

View File

@ -107,7 +107,7 @@ let
dontConfigure = true;
libPath = lib.makeLibraryPath [
stdenv.cc.cc.lib
stdenv.cc.cc
curlWithGnuTls
udev
libX11

View File

@ -85,7 +85,7 @@ let
for binary in ${builtins.concatStringsSep " " binaries}; do
patchelf \
--interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
--set-rpath ${lib.makeLibraryPath neededLibraries}:${libGL}/lib:${stdenv.cc.cc.lib}/lib${lib.optionalString stdenv.hostPlatform.is64bit "64"} \
--set-rpath ${lib.makeLibraryPath neededLibraries}:${libGL}/lib:${lib.getLib stdenv.cc.cc}/lib${lib.optionalString stdenv.hostPlatform.is64bit "64"} \
$binary
done

View File

@ -28,7 +28,7 @@ buildKodiBinaryAddon rec {
extraBuildInputs = [ pugixml rapidjson ];
extraRuntimeDependencies = [ glib nspr nss stdenv.cc.cc.lib ];
extraRuntimeDependencies = [ glib nspr nss (lib.getLib stdenv.cc.cc) ];
extraInstallPhase = let n = namespace; in ''
ln -s $out/lib/addons/${n}/libssd_wv.so $out/${addonDir}/${n}/libssd_wv.so

View File

@ -17,7 +17,7 @@
substitutions = {
dynamicLinker = "${stdenv.cc}/nix-support/dynamic-linker";
libPath = lib.makeLibraryPath [
stdenv.cc.cc.lib
stdenv.cc.cc
stdenv.cc.libc
dotnet-sdk.passthru.icu
zlib

View File

@ -42,7 +42,7 @@ else stdenv.mkDerivation rec {
PATH=${bintools-unwrapped}/bin:${llvmPackages.clang-unwrapped}/bin:$PATH \
clang -arch x86_64 -arch arm64 -arch arm64e \
-isystem "$SDKROOT/usr/include" \
-isystem ${llvmPackages.libclang.lib}/lib/clang/*/include \
-isystem ${lib.getLib llvmPackages.libclang}/lib/clang/*/include \
"-L$SDKROOT/usr/lib" \
-Wl,-install_name,$out/lib/$libName \
-Wall -std=c99 -O3 -fPIC libredirect.c \

View File

@ -232,7 +232,7 @@ in
nettle-sys = attrs: {
nativeBuildInputs = [ pkg-config ];
buildInputs = [ nettle clang ];
LIBCLANG_PATH = "${llvmPackages.libclang.lib}/lib";
LIBCLANG_PATH = "${lib.getLib llvmPackages.libclang}/lib";
};
openssl = attrs: {

View File

@ -92,7 +92,7 @@
bindgenHook = callPackage ({}: makeSetupHook {
name = "rust-bindgen-hook";
substitutions = {
libclang = clang.cc.lib;
libclang = (lib.getLib clang.cc);
inherit clang;
};
}

View File

@ -26,7 +26,7 @@ let
multiArch = true;
multiPkgs = pkgs: with pkgs; [
stdenv.cc.cc.lib
(lib.getLib stdenv.cc.cc)
xorg.libX11
xorg.libXext
xorg.libXrandr

View File

@ -24,7 +24,7 @@ stdenv.mkDerivation (finalAttrs: {
autoPatchelfHook
];
buildInputs = [ stdenv.cc.cc.lib ];
buildInputs = [ (lib.getLib stdenv.cc.cc) ];
installPhase = ''
runHook preInstall

View File

@ -77,7 +77,7 @@ stdenv.mkDerivation (finalAttrs: {
[
libdrm
openssl
stdenv.cc.cc.lib
stdenv.cc.cc
zlib
]
++ (with xorg; [

View File

@ -26,7 +26,7 @@ rustPlatform.buildRustPackage rec {
# No tests exist
doCheck = false;
buildInputs = [ stdenv.cc.cc.lib ];
buildInputs = [ (lib.getLib stdenv.cc.cc) ];
nativeBuildInputs = [ autoPatchelfHook ];
runtimeDependencies = [

View File

@ -46,7 +46,7 @@ stdenv.mkDerivation (finalAttrs: {
dontStrip = true;
buildInputs = [
stdenv.cc.cc.lib
(lib.getLib stdenv.cc.cc)
libkrb5
curl
lttng-ust

View File

@ -64,7 +64,7 @@ buildDotnetModule rec {
];
buildInputs = [
stdenv.cc.cc.lib
(lib.getLib stdenv.cc.cc)
fontconfig
openssl
libkrb5

View File

@ -20,7 +20,7 @@ rustPlatform.buildRustPackage rec {
cargoHash = "sha256-ma7JVbWSiKfkCXCDwA8DFm2+KPrWR+8nSdgGSqehNg8=";
env = {
LIBCLANG_PATH = "${llvmPackages.libclang.lib}/lib";
LIBCLANG_PATH = "${lib.getLib llvmPackages.libclang}/lib";
};

View File

@ -64,7 +64,7 @@ stdenv.mkDerivation (finalAttrs: {
# nix provide lib/clang headers in libclang, not in llvm.
substituteInPlace casadi/interfaces/clang/CMakeLists.txt --replace-fail \
'$'{CLANG_LLVM_LIB_DIR} \
${llvmPackages_17.libclang.lib}/lib
${lib.getLib llvmPackages_17.libclang}/lib
# help casadi find its own libs
substituteInPlace casadi/core/casadi_os.cpp --replace-fail \

View File

@ -122,7 +122,7 @@ stdenv.mkDerivation (finalAttrs: {
isGNU = unwrappedCC.isGNU or false;
isCcache = true;
};
inherit (unwrappedCC) lib;
lib = lib.getLib unwrappedCC;
nativeBuildInputs = [ makeWrapper ];
# Unwrapped clang does not have a targetPrefix because it is multi-target
# target is decided with argv0.

View File

@ -37,7 +37,7 @@ buildNpmPackage rec {
] ++ lib.optional stdenv.isLinux autoPatchelfHook; # for onnx libs
buildInputs = [
stdenv.cc.cc.lib # for libstdc++.so, required by onnxruntime
(lib.getLib stdenv.cc.cc) # for libstdc++.so, required by onnxruntime
vips # or it will try to download from the Internet
];

View File

@ -76,7 +76,7 @@ stdenv.mkDerivation (finalAttrs: {
];
buildInputs = [
stdenv.cc.cc.lib # Used by Conga and .NET Bridge
(lib.getLib stdenv.cc.cc) # Used by Conga and .NET Bridge
ncurses5 # Used by the dyalog binary to correctly display in the terminal
]
++ lib.optionals htmlRendererSupport [

View File

@ -110,7 +110,7 @@ rustPlatform.buildRustPackage rec {
postFixup = ''
wrapProgram $out/bin/ecc-rs \
--prefix LIBCLANG_PATH : ${llvmPackages.libclang.lib}/lib \
--prefix LIBCLANG_PATH : ${lib.getLib llvmPackages.libclang}/lib \
--prefix PATH : ${lib.makeBinPath (with llvmPackages; [clang bintools-unwrapped])}
'';

View File

@ -59,7 +59,7 @@ stdenv.mkDerivation (finalAttrs: {
buildInputs = [
libpulseaudio
pipewire
stdenv.cc.cc.lib
(lib.getLib stdenv.cc.cc)
];
patches =

View File

@ -27,7 +27,7 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ autoPatchelfHook ];
buildInputs = [ stdenv.cc.cc.lib ];
buildInputs = [ (lib.getLib stdenv.cc.cc) ];
sourceRoot = ".";

View File

@ -39,7 +39,7 @@ buildRustPackage rec {
protobuf
pkg-config
clang
libclang.lib
(lib.getLib libclang)
];
buildInputs = [
@ -79,7 +79,7 @@ buildRustPackage rec {
PROTOC = "${buildPackages.protobuf}/bin/protoc";
PROTOC_INCLUDE = "${protobuf}/include";
OPENSSL_DIR = openssl.dev;
LIBCLANG_PATH = "${libclang.lib}/lib";
LIBCLANG_PATH = "${lib.getLib libclang}/lib";
FEDIMINT_BUILD_FORCE_GIT_HASH = "0000000000000000000000000000000000000000";

View File

@ -119,7 +119,7 @@ buildDotnetModule rec {
darwin.autoSignDarwinBinariesHook
];
buildInputs = [ stdenv.cc.cc.lib ];
buildInputs = [ (lib.getLib stdenv.cc.cc) ];
dotnet-sdk = dotnetCorePackages.sdk_6_0;
dotnet-runtime = dotnetCorePackages.runtime_6_0;

View File

@ -37,7 +37,7 @@ stdenv.mkDerivation (finalAttrs: {
buildInputs = lib.optionals stdenv.hostPlatform.isLinux [
libpulseaudio
pipewire
stdenv.cc.cc.lib
(lib.getLib stdenv.cc.cc)
];
pnpmDeps = pnpm'.fetchDeps {

View File

@ -40,7 +40,7 @@ stdenv.mkDerivation rec {
preCheck = ''
# Make `libgcc_s.so' visible for `pthread_cancel'.
export LD_LIBRARY_PATH=\
"$(dirname $(echo ${stdenv.cc.cc.lib}/lib*/libgcc_s.so))''${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH"
"$(dirname $(echo ${lib.getLib stdenv.cc.cc}/lib*/libgcc_s.so))''${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH"
'';
meta = with lib; {

View File

@ -28,7 +28,7 @@ buildNpmPackage rec {
nativeBuildInputs = [ autoPatchelfHook ];
buildInputs = [ stdenv.cc.cc.lib ];
buildInputs = [ (lib.getLib stdenv.cc.cc) ];
# from lib/node_modules/igir/node_modules/@node-rs/crc32-linux-x64-musl/crc32.linux-x64-musl.node
# Irrelevant to our use

View File

@ -29,7 +29,7 @@ rustPlatform.buildRustPackage rec {
libz
libxml2
ncurses
stdenv.cc.cc.lib
(lib.getLib stdenv.cc.cc)
];
nativeBuildInputs = [

View File

@ -36,7 +36,7 @@ stdenv.mkDerivation rec {
let
libPath = {
intune = lib.makeLibraryPath [
stdenv.cc.cc.lib
stdenv.cc.cc
libuuid
xorg.libX11
curlMinimal

View File

@ -151,10 +151,10 @@ in stdenv.mkDerivation (finalAttrs: rec {
done
patchelf --set-interpreter $(cat ${stdenv.cc}/nix-support/dynamic-linker) contrib/bash_process-*/$arch/bash_process
for d in contrib/kodkodi-*/jni/$arch; do
patchelf --set-rpath "${lib.concatStringsSep ":" [ "${java}/lib/openjdk/lib/server" "${stdenv.cc.cc.lib}/lib" ]}" $d/*.so
patchelf --set-rpath "${lib.concatStringsSep ":" [ "${java}/lib/openjdk/lib/server" "${lib.getLib stdenv.cc.cc}/lib" ]}" $d/*.so
done
'' + lib.optionalString (stdenv.hostPlatform.system == "x86_64-linux") ''
patchelf --set-rpath "${stdenv.cc.cc.lib}/lib" contrib/z3-*/$arch/z3
patchelf --set-rpath "${lib.getLib stdenv.cc.cc}/lib" contrib/z3-*/$arch/z3
'';
buildPhase = ''

View File

@ -25,7 +25,7 @@ rustPlatform.buildRustPackage rec {
cargoHash = "sha256-EP3fS4lAGOaXJXAM22ZCn4+9Ah8TM1+wvNerKCKByo0=";
buildInputs = [
stdenv.cc.cc.lib
(lib.getLib stdenv.cc.cc)
];
nativeBuildInputs = [

Some files were not shown because too many files have changed in this diff Show More