treewide: stdenv.glibc -> glibc

This commit is contained in:
Artturin 2022-05-23 21:28:14 +03:00
parent a05b581783
commit 0c4d65b21e
42 changed files with 94 additions and 101 deletions

View file

@ -77,7 +77,7 @@ There is a special handling of the `debug` output, described at [](#stdenv-separ
A commonly adopted convention in `nixpkgs` is that executables provided by the package are contained within its first output. This convention allows the dependent packages to reference the executables provided by packages in a uniform manner. For instance, provided with the knowledge that the `perl` package contains a `perl` executable it can be referenced as `${pkgs.perl}/bin/perl` within a Nix derivation that needs to execute a Perl script.
The `glibc` package is a deliberate single exception to the “binaries first” convention. The `glibc` has `libs` as its first output allowing the libraries provided by `glibc` to be referenced directly (e.g. `${stdenv.glibc}/lib/ld-linux-x86-64.so.2`). The executables provided by `glibc` can be accessed via its `bin` attribute (e.g. `${stdenv.glibc.bin}/bin/ldd`).
The `glibc` package is a deliberate single exception to the “binaries first” convention. The `glibc` has `libs` as its first output allowing the libraries provided by `glibc` to be referenced directly (e.g. `${glibc}/lib/ld-linux-x86-64.so.2`). The executables provided by `glibc` can be accessed via its `bin` attribute (e.g. `${glibc.bin}/bin/ldd`).
The reason for why `glibc` deviates from the convention is because referencing a library provided by `glibc` is a very common operation among Nix packages. For instance, third-party executables packaged by Nix are typically patched and relinked with the relevant version of `glibc` libraries from Nix packages (please see the documentation on [patchelf](https://github.com/NixOS/patchelf) for more details).

View file

@ -61,7 +61,7 @@ for bin in $(find $binaryDist -executable -type f) :; do
uniq;
)
if test "$names" = "glibc"; then names="stdenv.glibc"; fi
if test "$names" = "glibc"; then names="glibc"; fi
if echo $names | grep -c "gcc" &> /dev/null; then names="stdenv.cc.cc"; fi
if test $lib != $libPath; then

View file

@ -1,5 +1,5 @@
{ lib, stdenv, fetchurl, libXmu, libXt, libX11, libXext, libXxf86vm, libjack2
, makeWrapper
, makeWrapper, glibc
}:
let
@ -36,7 +36,7 @@ stdenv.mkDerivation rec {
cp -r . "$out/libexec/baudline/"
interpreter="$(echo ${stdenv.glibc.out}/lib/ld-linux*)"
interpreter="$(echo ${glibc.out}/lib/ld-linux*)"
for prog in "$out"/libexec/baudline/baudline*; do
patchelf --interpreter "$interpreter" "$prog"
ln -sr "$prog" "$out/bin/"

View file

@ -1,4 +1,5 @@
{ lib
, glibc
, stdenv
, fetchFromGitHub
, alsa-lib
@ -20,8 +21,6 @@
, zlib
}:
assert stdenv ? glibc;
stdenv.mkDerivation rec {
pname = "yoshimi";
version = "2.1.2.2";
@ -60,7 +59,7 @@ stdenv.mkDerivation rec {
zlib
];
cmakeFlags = [ "-DFLTK_MATH_LIBRARY=${stdenv.glibc.out}/lib/libm.so" ];
cmakeFlags = [ "-DFLTK_MATH_LIBRARY=${glibc.out}/lib/libm.so" ];
meta = with lib; {
description = "High quality software synthesizer based on ZynAddSubFX";

View file

@ -1,4 +1,4 @@
{ lib, stdenv, makeDesktopItem, freetype, fontconfig, libX11, libXrender
{ lib, stdenv, makeDesktopItem, freetype, fontconfig, libX11, libXrender, glibc
, zlib, jdk, glib, glib-networking, gtk, libXtst, libsecret, gsettings-desktop-schemas, webkitgtk
, makeWrapper, perl, ... }:
@ -28,7 +28,7 @@ stdenv.mkDerivation rec {
tar xfvz $src -C $out
# Patch binaries.
interpreter=$(echo ${stdenv.glibc.out}/lib/ld-linux*.so.2)
interpreter=$(echo ${glibc.out}/lib/ld-linux*.so.2)
libCairo=$out/eclipse/libcairo-swt.so
patchelf --set-interpreter $interpreter $out/eclipse/eclipse
[ -f $libCairo ] && patchelf --set-rpath ${lib.makeLibraryPath [ freetype fontconfig libX11 libXrender zlib ]} $libCairo

View file

@ -6,8 +6,6 @@
, callPackage
}:
assert stdenv ? glibc;
# https://download.eclipse.org/eclipse/downloads/ is the main place to
# find the downloads needed for new versions
#

View file

@ -1,4 +1,4 @@
{ stdenv, lib, makeDesktopItem, makeWrapper, patchelf, writeText
{ stdenv, lib, makeDesktopItem, makeWrapper, patchelf, writeText, glibc
, coreutils, gnugrep, which, git, unzip, libsecret, libnotify, e2fsprogs
, vmopts ? null
}:
@ -46,7 +46,7 @@ with stdenv; lib.makeOverridable mkDerivation (rec {
truncate --size=$size $fname
}
interpreter=$(echo ${stdenv.glibc.out}/lib/ld-linux*.so.2)
interpreter=$(echo ${glibc.out}/lib/ld-linux*.so.2)
if [[ "${stdenv.hostPlatform.system}" == "x86_64-linux" && -e bin/fsnotifier64 ]]; then
target_size=$(get_file_size bin/fsnotifier64)
patchelf --set-interpreter "$interpreter" bin/fsnotifier64

View file

@ -11,7 +11,7 @@ function get_pkg_out() {
echo "$(nix-build -E "$nixExp" --no-out-link)${suffix}"
}
interpreter="$(get_pkg_out "stdenv.glibc" "/lib/ld-linux-x86-64.so.2")"
interpreter="$(get_pkg_out "glibc" "/lib/ld-linux-x86-64.so.2")"
echo "interpreter='$interpreter'"
# For clangformat dep on 'libtinfo.so.5'.
@ -49,4 +49,3 @@ function print_nix_version_mono() {
echo "nixMonoBin='$nixMonoBin'"
$nixMonoBin/mono --version
}

View file

@ -1,8 +1,8 @@
{ stdenv, lib, fetchurl, callPackage, patchelf, makeWrapper, libusb-compat-0_1 }:
{ stdenv, lib, fetchurl, callPackage, patchelf, makeWrapper, libusb-compat-0_1, glibc }:
let
myPatchElf = file: with lib; ''
patchelf --set-interpreter \
${stdenv.glibc}/lib/ld-linux${optionalString stdenv.is64bit "-x86-64"}.so.2 \
${glibc}/lib/ld-linux${optionalString stdenv.is64bit "-x86-64"}.so.2 \
${file}
'';

View file

@ -1,8 +1,8 @@
{ stdenv, lib, fetchurl, callPackage, patchelf, makeWrapper, libusb1, avahi-compat, glib, libredirect, nixosTests }:
{ stdenv, lib, fetchurl, callPackage, patchelf, makeWrapper, libusb1, avahi-compat, glib, libredirect, nixosTests, glibc }:
let
myPatchElf = file: with lib; ''
patchelf --set-interpreter \
${stdenv.glibc}/lib/ld-linux${optionalString stdenv.is64bit "-x86-64"}.so.2 \
${glibc}/lib/ld-linux${optionalString stdenv.is64bit "-x86-64"}.so.2 \
${file}
'';
system = stdenv.hostPlatform.system;

View file

@ -1,4 +1,4 @@
{ lib, stdenv, fetchurl, makeWrapper, patchelf
{ lib, stdenv, fetchurl, makeWrapper, patchelf, glibc
, fontconfig, freetype, glib, libICE, libSM
, libX11, libXext, libXrender, zlib
}:
@ -37,7 +37,7 @@ in stdenv.mkDerivation {
rm -f $out/opt/SpiderOakONE/lib/libz*
patchelf --set-interpreter ${stdenv.glibc.out}/lib/ld-linux-x86-64.so.2 \
patchelf --set-interpreter ${glibc.out}/lib/ld-linux-x86-64.so.2 \
"$out/opt/SpiderOakONE/lib/SpiderOakONE"
RPATH=$out/opt/SpiderOakONE/lib:${ldpath}

View file

@ -1,4 +1,4 @@
{ lib, stdenv, makeWrapper, openjdk, gtk2, xorg, glibcLocales, releasePath ? null }:
{ lib, stdenv, makeWrapper, openjdk, gtk2, xorg, glibc, glibcLocales, releasePath ? null }:
# To use this package, you need to download your own cplex installer from IBM
# and override the releasePath attribute to point to the location of the file.
@ -53,7 +53,7 @@ stdenv.mkDerivation rec {
let
libraryPath = lib.makeLibraryPath [ stdenv.cc.cc gtk2 xorg.libXtst ];
in ''
interpreter=${stdenv.glibc}/lib/ld-linux-x86-64.so.2
interpreter=${glibc}/lib/ld-linux-x86-64.so.2
for pgm in $out/opl/bin/x86-64_linux/oplrun $out/opl/bin/x86-64_linux/oplrunjava $out/opl/oplide/oplide;
do

View file

@ -1,4 +1,4 @@
{ lib, stdenv, fetchurl, ghostscript }:
{ lib, stdenv, fetchurl, ghostscript, glibc }:
stdenv.mkDerivation rec {
pname = "hmetis";
@ -16,8 +16,8 @@ stdenv.mkDerivation rec {
patchPhase = ''
for binaryfile in $binaryFiles; do
patchelf \
--set-interpreter ${stdenv.glibc}/lib/ld-linux.so.2 \
--set-rpath ${stdenv.glibc}/lib \
--set-interpreter ${glibc}/lib/ld-linux.so.2 \
--set-rpath ${glibc}/lib \
$binaryfile
done
'';

View file

@ -1,5 +1,5 @@
{ config, stdenv, fetchurl, lib, acpica-tools, dev86, pam, libxslt, libxml2, wrapQtAppsHook
, libX11, xorgproto, libXext, libXcursor, libXmu, libIDL, SDL, libcap, libGL
, libX11, xorgproto, libXext, libXcursor, libXmu, libIDL, SDL, libcap, libGL, glibc
, libpng, glib, lvm2, libXrandr, libXinerama, libopus, qtbase, qtx11extras
, qttools, qtsvg, qtwayland, pkg-config, which, docbook_xsl, docbook_xml_dtd_43
, alsa-lib, curl, libvpx, nettools, dbus, substituteAll, gsoap, zlib
@ -62,8 +62,8 @@ in stdenv.mkDerivation {
${optionalString (!headless) ''
-e 's@TOOLQT5BIN=.*@TOOLQT5BIN="${getDev qtbase}/bin"@' \
''} -i configure
ls kBuild/bin/linux.x86/k* tools/linux.x86/bin/* | xargs -n 1 patchelf --set-interpreter ${stdenv.glibc.out}/lib/ld-linux.so.2
ls kBuild/bin/linux.amd64/k* tools/linux.amd64/bin/* | xargs -n 1 patchelf --set-interpreter ${stdenv.glibc.out}/lib/ld-linux-x86-64.so.2
ls kBuild/bin/linux.x86/k* tools/linux.x86/bin/* | xargs -n 1 patchelf --set-interpreter ${glibc.out}/lib/ld-linux.so.2
ls kBuild/bin/linux.amd64/k* tools/linux.amd64/bin/* | xargs -n 1 patchelf --set-interpreter ${glibc.out}/lib/ld-linux-x86-64.so.2
grep 'libpulse\.so\.0' src include -rI --files-with-match | xargs sed -i -e '
${optionalString pulseSupport

View file

@ -35,10 +35,10 @@ rec {
mkdir -p $out/lib
# Copy what we need from Glibc.
cp -p ${pkgs.stdenv.glibc.out}/lib/ld-linux*.so.? $out/lib
cp -p ${pkgs.stdenv.glibc.out}/lib/libc.so.* $out/lib
cp -p ${pkgs.stdenv.glibc.out}/lib/libm.so.* $out/lib
cp -p ${pkgs.stdenv.glibc.out}/lib/libresolv.so.* $out/lib
cp -p ${pkgs.glibc.out}/lib/ld-linux*.so.? $out/lib
cp -p ${pkgs.glibc.out}/lib/libc.so.* $out/lib
cp -p ${pkgs.glibc.out}/lib/libm.so.* $out/lib
cp -p ${pkgs.glibc.out}/lib/libresolv.so.* $out/lib
# Copy BusyBox.
cp -pd ${pkgs.busybox}/bin/* $out/bin

View file

@ -1,6 +1,4 @@
{ lib, stdenv, fetchurl }:
assert stdenv ? glibc;
{ lib, stdenv, fetchurl, glibc }:
stdenv.mkDerivation rec {
version = "3.1";
@ -25,7 +23,7 @@ stdenv.mkDerivation rec {
installPhase = ''
for b in cgc cgfxcat cginfo
do
patchelf --set-interpreter ${stdenv.glibc.out}/lib/ld-linux*.so.? "bin/$b"
patchelf --set-interpreter ${glibc.out}/lib/ld-linux*.so.? "bin/$b"
done
# FIXME: cgfxcat and cginfo need more patchelf
mkdir -p "$out/bin/"

View file

@ -33,7 +33,8 @@ stdenv.mkDerivation rec {
sed -i \
-e 's/$(INCLUDES) -I. -O2 -DSOCKLEN_T/$(INCLUDES) -I. -O2 -I. -fPIC -DRTSPCLIENT_SYNCHRONOUS_INTERFACE=1 -DSOCKLEN_T/g' \
config.linux
'' + lib.optionalString (stdenv ? glibc) ''
'' # condition from icu/base.nix
+ lib.optionalString (stdenv.hostPlatform.libc == "glibc" || stdenv.hostPlatform.libc == "musl") ''
substituteInPlace liveMedia/include/Locale.hh \
--replace '<xlocale.h>' '<locale.h>'
'';

View file

@ -3,7 +3,7 @@
deployAndroidPackage {
inherit package os;
nativeBuildInputs = [ autoPatchelfHook ];
buildInputs = lib.optional (os == "linux") [ pkgs.stdenv.glibc pkgs.stdenv.cc.cc pkgs.ncurses5 ];
buildInputs = lib.optional (os == "linux") [ pkgs.glibc pkgs.stdenv.cc.cc pkgs.ncurses5 ];
patchInstructions = lib.optionalString (os == "linux") ''
autoPatchelf $packageBaseDir/bin
'';

View file

@ -1,6 +1,7 @@
{ lib, stdenv
, buildPythonPackage
, fetchPypi
, glibc
}:
buildPythonPackage rec {
@ -16,7 +17,7 @@ buildPythonPackage rec {
patchPhase = lib.optionalString stdenv.isLinux ''
substituteInPlace monotonic.py --replace \
"ctypes.util.find_library('c')" "'${stdenv.glibc.out}/lib/libc.so.6'"
"ctypes.util.find_library('c')" "'${glibc.out}/lib/libc.so.6'"
'';
meta = with lib; {

View file

@ -54,7 +54,7 @@ buildPythonPackage rec {
# twisted.python.runtime.platform.supportsINotify() == False
postPatch = lib.optionalString stdenv.isLinux ''
substituteInPlace src/twisted/python/_inotify.py --replace \
"ctypes.util.find_library(\"c\")" "'${stdenv.glibc.out}/lib/libc.so.6'"
"ctypes.util.find_library(\"c\")" "'${stdenv.cc.libc}/lib/libc.so.6'"
'';
# Generate Twisted's plug-in cache. Twisted users must do it as well. See

View file

@ -1,4 +1,5 @@
{ fetchurl
, glibc
, fontconfig
, freetype
, glib
@ -57,7 +58,7 @@ stdenv.mkDerivation rec {
mv mat $out
# Patch binaries.
interpreter=$(echo ${stdenv.glibc.out}/lib/ld-linux*.so.2)
interpreter=$(echo ${glibc.out}/lib/ld-linux*.so.2)
libCairo=$out/eclipse/libcairo-swt.so
patchelf --set-interpreter $interpreter $out/mat/MemoryAnalyzer
[ -f $libCairo ] && patchelf --set-rpath ${

View file

@ -1,4 +1,4 @@
{ lib, stdenv, makeWrapper, requireFile, gcc, unzip }:
{ lib, stdenv, makeWrapper, requireFile, gcc, unzip, glibc }:
with lib;
# v2.1: last version with NHM/WSM arch support
@ -19,7 +19,7 @@ stdenv.mkDerivation rec {
'';
preFixup = let libPath = makeLibraryPath [ stdenv.cc.cc.lib gcc ]; in ''
patchelf \
--set-interpreter ${stdenv.glibc}/lib/ld-linux-x86-64.so.2 \
--set-interpreter ${glibc}/lib/ld-linux-x86-64.so.2 \
--set-rpath $out/lib:"${libPath}" \
$out/bin/iaca
'';

View file

@ -1,4 +1,4 @@
{ lib, stdenv, requireFile, unzip }:
{ lib, stdenv, requireFile, unzip, glibc }:
with lib;
stdenv.mkDerivation rec {
@ -13,7 +13,7 @@ stdenv.mkDerivation rec {
installPhase = ''
mkdir -p $out/bin
cp iaca $out/bin
patchelf --set-interpreter ${stdenv.glibc}/lib/ld-linux-x86-64.so.2 $out/bin/iaca
patchelf --set-interpreter ${glibc}/lib/ld-linux-x86-64.so.2 $out/bin/iaca
'';
meta = {
description = "Intel Architecture Code Analyzer";

View file

@ -1,7 +1,5 @@
{ lib, stdenv, fetchFromGitHub, perl, perlPackages }:
assert stdenv ? glibc;
perlPackages.buildPerlPackage {
pname = "ninka";
version = "2.0-pre";

View file

@ -1,4 +1,4 @@
{ lib, stdenv, config, fetchurl, patchelf, makeWrapper, gtk2, glib, udev, alsa-lib, atk
{ lib, stdenv, glibc, config, fetchurl, patchelf, makeWrapper, gtk2, glib, udev, alsa-lib, atk
, nspr, fontconfig, cairo, pango, nss, freetype, gnome2, gdk-pixbuf, curl, systemd, xorg, requireFile }:
stdenv.mkDerivation rec {
@ -23,12 +23,12 @@ stdenv.mkDerivation rec {
ln -s ${systemd}/lib/libudev.so.1 $out/lib/libudev.so.0
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" "$out/PA"
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" --set-rpath "${lib.makeLibraryPath [ stdenv.cc.cc.lib xorg.libXdamage xorg.libXfixes gtk2 glib stdenv.glibc.out "$out" xorg.libXext pango udev xorg.libX11 xorg.libXcomposite alsa-lib atk nspr fontconfig cairo pango nss freetype gnome2.GConf gdk-pixbuf xorg.libXrender ]}:{stdenv.cc.cc.lib}/lib64:${stdenv.glibc.out}/lib64" "$out/host/CoherentUI_Host"
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" --set-rpath "${lib.makeLibraryPath [ stdenv.cc.cc.lib xorg.libXdamage xorg.libXfixes gtk2 glib glibc.out "$out" xorg.libXext pango udev xorg.libX11 xorg.libXcomposite alsa-lib atk nspr fontconfig cairo pango nss freetype gnome2.GConf gdk-pixbuf xorg.libXrender ]}:{stdenv.cc.cc.lib}/lib64:${glibc.out}/lib64" "$out/host/CoherentUI_Host"
wrapProgram $out/PA --prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ stdenv.cc.cc.lib stdenv.glibc.out xorg.libX11 xorg.libXcursor gtk2 glib curl "$out" ]}:${stdenv.cc.cc.lib}/lib64:${stdenv.glibc.out}/lib64"
wrapProgram $out/PA --prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ stdenv.cc.cc.lib glibc.out xorg.libX11 xorg.libXcursor gtk2 glib curl "$out" ]}:${stdenv.cc.cc.lib}/lib64:${glibc.out}/lib64"
for f in $out/lib/*; do
patchelf --set-rpath "${lib.makeLibraryPath [ stdenv.cc.cc.lib curl xorg.libX11 stdenv.glibc.out xorg.libXcursor "$out" ]}:${stdenv.cc.cc.lib}/lib64:${stdenv.glibc.out}/lib64" $f
patchelf --set-rpath "${lib.makeLibraryPath [ stdenv.cc.cc.lib curl xorg.libX11 glibc.out xorg.libXcursor "$out" ]}:${stdenv.cc.cc.lib}/lib64:${glibc.out}/lib64" $f
done
'';

View file

@ -1,4 +1,4 @@
{ lib, stdenv, fetchurl, unzip, patchelf, xorg, openal }:
{ lib, stdenv, fetchurl, unzip, patchelf, xorg, openal, glibc }:
let
urls = file:
@ -24,7 +24,7 @@ let
cd $out
unzip $src
interpreter=$(echo ${stdenv.glibc.out}/lib/ld-linux*.so.2)
interpreter=$(echo ${glibc.out}/lib/ld-linux*.so.2)
binary=$(find . -executable -type f)
patchelf \
--set-interpreter $interpreter \

View file

@ -30,7 +30,7 @@
let
myPatchElf = file: with lib; ''
patchelf --set-interpreter \
${stdenv.glibc}/lib/ld-linux${optionalString stdenv.is64bit "-x86-64"}.so.2 \
${glibc}/lib/ld-linux${optionalString stdenv.is64bit "-x86-64"}.so.2 \
${file}
'';
in

View file

@ -1,6 +1,5 @@
{ lib
, stdenv
, stdenv_32bit
, fetchurl
, unzip
, autoconf
@ -24,6 +23,7 @@
, ghostscript
, pkgs
, pkgsi686Linux
, glibc
, zlib
}:
@ -151,9 +151,9 @@ stdenv.mkDerivation rec {
ln -sf libufr2filterr.so.1.0.0 libufr2filterr.so
ln -sf libufr2filterr.so.1.0.0 libufr2filterr.so.1
patchelf --set-rpath "$(cat ${i686_NIX_GCC}/nix-support/orig-cc)/lib:${libs pkgsi686Linux}:${stdenv_32bit.glibc.out}/lib:${pkgsi686Linux.libxml2.out}/lib:$out/lib32" libcanonufr2r.so.1.0.0
patchelf --set-rpath "$(cat ${i686_NIX_GCC}/nix-support/orig-cc)/lib:${libs pkgsi686Linux}:${stdenv_32bit.glibc.out}/lib" libcaepcmufr2.so.1.0
patchelf --set-rpath "$(cat ${i686_NIX_GCC}/nix-support/orig-cc)/lib:${libs pkgsi686Linux}:${stdenv_32bit.glibc.out}/lib" libColorGearCufr2.so.2.0.0
patchelf --set-rpath "$(cat ${i686_NIX_GCC}/nix-support/orig-cc)/lib:${libs pkgsi686Linux}:${pkgsi686Linux.glibc.out}/lib:${pkgsi686Linux.libxml2.out}/lib:$out/lib32" libcanonufr2r.so.1.0.0
patchelf --set-rpath "$(cat ${i686_NIX_GCC}/nix-support/orig-cc)/lib:${libs pkgsi686Linux}:${pkgsi686Linux.glibc.out}/lib" libcaepcmufr2.so.1.0
patchelf --set-rpath "$(cat ${i686_NIX_GCC}/nix-support/orig-cc)/lib:${libs pkgsi686Linux}:${pkgsi686Linux.glibc.out}/lib" libColorGearCufr2.so.2.0.0
)
(
@ -167,17 +167,17 @@ stdenv.mkDerivation rec {
ln -sf libufr2filterr.so.1.0.0 libufr2filterr.so
ln -sf libufr2filterr.so.1.0.0 libufr2filterr.so.1
patchelf --set-rpath "$(cat $NIX_CC/nix-support/orig-cc)/lib:${libs pkgs}:${stdenv.cc.cc.lib}/lib64:${stdenv.glibc.out}/lib64:$out/lib" libcanonufr2r.so.1.0.0
patchelf --set-rpath "$(cat $NIX_CC/nix-support/orig-cc)/lib:${libs pkgs}:${stdenv.cc.cc.lib}/lib64:${stdenv.glibc.out}/lib64" libcaepcmufr2.so.1.0
patchelf --set-rpath "$(cat $NIX_CC/nix-support/orig-cc)/lib:${libs pkgs}:${stdenv.cc.cc.lib}/lib64:${stdenv.glibc.out}/lib64" libColorGearCufr2.so.2.0.0
patchelf --set-rpath "$(cat $NIX_CC/nix-support/orig-cc)/lib:${libs pkgs}:${stdenv.cc.cc.lib}/lib64:${glibc.out}/lib64:$out/lib" libcanonufr2r.so.1.0.0
patchelf --set-rpath "$(cat $NIX_CC/nix-support/orig-cc)/lib:${libs pkgs}:${stdenv.cc.cc.lib}/lib64:${glibc.out}/lib64" libcaepcmufr2.so.1.0
patchelf --set-rpath "$(cat $NIX_CC/nix-support/orig-cc)/lib:${libs pkgs}:${stdenv.cc.cc.lib}/lib64:${glibc.out}/lib64" libColorGearCufr2.so.2.0.0
)
(
cd $out/bin
patchelf --set-interpreter "$(cat ${ld64})" --set-rpath "${lib.makeLibraryPath buildInputs}:${stdenv.cc.cc.lib}/lib64:${stdenv.glibc.out}/lib64" cnsetuputil2
patchelf --set-interpreter "$(cat ${ld64})" --set-rpath "${lib.makeLibraryPath buildInputs}:${stdenv.cc.cc.lib}/lib64:${stdenv.glibc.out}/lib64" cnpdfdrv
patchelf --set-interpreter "$(cat ${ld64})" --set-rpath "${lib.makeLibraryPath buildInputs}:${stdenv.cc.cc.lib}/lib64:${stdenv.glibc.out}/lib64:$out/lib" cnpkbidir
patchelf --set-interpreter "$(cat ${ld64})" --set-rpath "${lib.makeLibraryPath buildInputs}:${stdenv.cc.cc.lib}/lib64:${stdenv.glibc.out}/lib64:$out/lib" cnrsdrvufr2
patchelf --set-interpreter "$(cat ${ld64})" --set-rpath "${lib.makeLibraryPath buildInputs}:${stdenv.cc.cc.lib}/lib64:${glibc.out}/lib64" cnsetuputil2
patchelf --set-interpreter "$(cat ${ld64})" --set-rpath "${lib.makeLibraryPath buildInputs}:${stdenv.cc.cc.lib}/lib64:${glibc.out}/lib64" cnpdfdrv
patchelf --set-interpreter "$(cat ${ld64})" --set-rpath "${lib.makeLibraryPath buildInputs}:${stdenv.cc.cc.lib}/lib64:${glibc.out}/lib64:$out/lib" cnpkbidir
patchelf --set-interpreter "$(cat ${ld64})" --set-rpath "${lib.makeLibraryPath buildInputs}:${stdenv.cc.cc.lib}/lib64:${glibc.out}/lib64:$out/lib" cnrsdrvufr2
mv cnsetuputil2 cnsetuputil2.wrapped
echo "#!${runtimeShell} -e" > cnsetuputil2

View file

@ -1,4 +1,4 @@
{lib, stdenv, fetchurl, cups, dpkg, gnused, makeWrapper, ghostscript, file, a2ps, coreutils, gawk}:
{lib, stdenv, fetchurl, cups, dpkg, gnused, makeWrapper, ghostscript, file, a2ps, coreutils, gawk, glibc }:
let
version = "3.0.1-1";
@ -38,9 +38,9 @@ stdenv.mkDerivation {
sed -i '/GHOST_SCRIPT=/c\GHOST_SCRIPT=gs' $out/opt/brother/Printers/HL1110/lpd/psconvert2
patchelf --set-interpreter ${stdenv.glibc.out}/lib/ld-linux.so.2 $out/opt/brother/Printers/HL1110/lpd/brprintconflsr3
patchelf --set-interpreter ${stdenv.glibc.out}/lib/ld-linux.so.2 $out/opt/brother/Printers/HL1110/lpd/rawtobr3
patchelf --set-interpreter ${stdenv.glibc.out}/lib/ld-linux.so.2 $out/opt/brother/Printers/HL1110/inf/braddprinter
patchelf --set-interpreter ${glibc.out}/lib/ld-linux.so.2 $out/opt/brother/Printers/HL1110/lpd/brprintconflsr3
patchelf --set-interpreter ${glibc.out}/lib/ld-linux.so.2 $out/opt/brother/Printers/HL1110/lpd/rawtobr3
patchelf --set-interpreter ${glibc.out}/lib/ld-linux.so.2 $out/opt/brother/Printers/HL1110/inf/braddprinter
wrapProgram $out/opt/brother/Printers/HL1110/lpd/psconvert2 \
--prefix PATH ":" ${ lib.makeBinPath [ gnused coreutils gawk ] }

View file

@ -1,4 +1,4 @@
{lib, stdenv, fetchurl, cups, dpkg, gnused, makeWrapper, ghostscript, file, a2ps, coreutils, gawk}:
{lib, stdenv, fetchurl, cups, dpkg, gnused, makeWrapper, ghostscript, file, a2ps, coreutils, gawk, glibc}:
let
version = "1.1.4-0";
@ -41,8 +41,8 @@ stdenv.mkDerivation {
sed -i '/GHOST_SCRIPT=/c\GHOST_SCRIPT=gs' $out/opt/brother/Printers/hl3140cw/lpd/psconvertij2
patchelf --set-interpreter ${stdenv.glibc.out}/lib/ld-linux.so.2 $out/opt/brother/Printers/hl3140cw/lpd/brhl3140cwfilter
patchelf --set-interpreter ${stdenv.glibc.out}/lib/ld-linux.so.2 $out/usr/bin/brprintconf_hl3140cw
patchelf --set-interpreter ${glibc.out}/lib/ld-linux.so.2 $out/opt/brother/Printers/hl3140cw/lpd/brhl3140cwfilter
patchelf --set-interpreter ${glibc.out}/lib/ld-linux.so.2 $out/usr/bin/brprintconf_hl3140cw
wrapProgram $out/opt/brother/Printers/hl3140cw/lpd/psconvertij2 \
--prefix PATH ":" ${ lib.makeBinPath [ gnused coreutils gawk ] }

View file

@ -1,4 +1,4 @@
{ lib, stdenv, fetchurl, cups, dpkg, ghostscript, a2ps, coreutils, gnused, gawk, file, makeWrapper }:
{ lib, stdenv, fetchurl, cups, dpkg, ghostscript, a2ps, coreutils, gnused, gawk, file, makeWrapper, glibc }:
stdenv.mkDerivation rec {
pname = "mfcj470dw-cupswrapper";
@ -22,7 +22,7 @@ stdenv.mkDerivation rec {
sed -i '/GHOST_SCRIPT=/c\GHOST_SCRIPT=gs' $out/opt/brother/Printers/mfcj470dw/lpd/psconvertij2
patchelf --set-interpreter ${stdenv.glibc.out}/lib/ld-linux.so.2 $out/opt/brother/Printers/mfcj470dw/lpd/brmfcj470dwfilter
patchelf --set-interpreter ${glibc.out}/lib/ld-linux.so.2 $out/opt/brother/Printers/mfcj470dw/lpd/brmfcj470dwfilter
mkdir -p $out/lib/cups/filter/
ln -s $out/opt/brother/Printers/mfcj470dw/lpd/filtermfcj470dw $out/lib/cups/filter/brother_lpdwrapper_mfcj470dw

View file

@ -1,4 +1,4 @@
{ lib, stdenv, fetchurl, kernel, alsa-lib }:
{ lib, stdenv, fetchurl, kernel, alsa-lib, glibc }:
with lib;
@ -7,7 +7,7 @@ let
if stdenv.is64bit then "64"
else "32";
libpath = makeLibraryPath [ stdenv.cc.cc stdenv.glibc alsa-lib ];
libpath = makeLibraryPath [ stdenv.cc.cc glibc alsa-lib ];
in
stdenv.mkDerivation rec {

View file

@ -1,4 +1,5 @@
{ stdenv
, glibc
, fetchFromGitHub
, fetchpatch
, fetchurl
@ -53,7 +54,7 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [
perl
sgx-sdk
stdenv.glibc
glibc
which
];

View file

@ -69,7 +69,7 @@ rec {
}));
} // lib.optionalAttrs (stdenv0.hostPlatform.libc == "libc") {
extraBuildInputs = (old.extraBuildInputs or []) ++ [
stdenv0.glibc.static
pkgs.glibc.static
];
});
@ -119,7 +119,7 @@ rec {
++ lib.optional (!stdenv.hostPlatform.isDarwin) makeStaticBinaries
# Glibc doesnt come with static runtimes by default.
# ++ lib.optional (stdenv.hostPlatform.libc == "glibc") ((lib.flip overrideInStdenv) [ self.stdenv.glibc.static ])
# ++ lib.optional (stdenv.hostPlatform.libc == "glibc") ((lib.flip overrideInStdenv) [ self.glibc.static ])
);

View file

@ -1,4 +1,4 @@
{ lib, stdenv, fetchurl }:
{ lib, stdenv, fetchurl, glibc }:
stdenv.mkDerivation rec {
pname = "kzipmix";
@ -13,8 +13,8 @@ stdenv.mkDerivation rec {
mkdir -p $out/bin
cp amd64/{kzip,zipmix} $out/bin
patchelf --set-interpreter ${stdenv.glibc.out}/lib/ld-linux.so.2 $out/bin/kzip
patchelf --set-interpreter ${stdenv.glibc.out}/lib/ld-linux.so.2 $out/bin/zipmix
patchelf --set-interpreter ${glibc.out}/lib/ld-linux.so.2 $out/bin/kzip
patchelf --set-interpreter ${glibc.out}/lib/ld-linux.so.2 $out/bin/zipmix
'';
meta = with lib; {

View file

@ -2,6 +2,7 @@
, stdenv
, fetchurl
, unzip
, glibc
}:
let
@ -36,7 +37,7 @@ stdenv.mkDerivation rec {
mkdir -p $out/bin
cp ${platform.folder}/pngout $out/bin
'' + lib.optionalString stdenv.isLinux ''
patchelf --set-interpreter ${stdenv.glibc.out}/lib/${platform.ld-linux} $out/bin/pngout
patchelf --set-interpreter ${glibc.out}/lib/${platform.ld-linux} $out/bin/pngout
'';
meta = {

View file

@ -1,4 +1,4 @@
{ lib, stdenv, fetchurl, gettext, gawk, bash }:
{ lib, stdenv, fetchurl, gettext, gawk, bash, glibc }:
stdenv.mkDerivation rec {
pname = "m17n-db";
@ -14,8 +14,7 @@ stdenv.mkDerivation rec {
strictDeps = true;
configureFlags = lib.optional (stdenv ? glibc)
"--with-charmaps=${stdenv.glibc.out}/share/i18n/charmaps"
configureFlags = [ "--with-charmaps=${glibc.out}/share/i18n/charmaps" ]
;
meta = {

View file

@ -1,4 +1,4 @@
{ lib, stdenv, fetchurl }:
{ lib, stdenv, fetchurl, glibc }:
stdenv.mkDerivation rec {
pname = "nbench-byte";
@ -17,7 +17,7 @@ stdenv.mkDerivation rec {
'';
buildInputs = lib.optionals stdenv.hostPlatform.isGnu [
stdenv.glibc.static
glibc.static
];
makeFlags = [ "CC=${stdenv.cc.targetPrefix}cc" ];

View file

@ -1,4 +1,4 @@
{ lib, stdenv, fetchurl, pkg-config, glib, which, bison, nixosTests }:
{ lib, stdenv, fetchurl, pkg-config, glib, which, bison, nixosTests, linuxHeaders }:
stdenv.mkDerivation rec {
pname = "nbd";
@ -9,8 +9,7 @@ stdenv.mkDerivation rec {
sha256 = "sha256-aHcVbSOnsz917uidL1wskcVCr8PNy2Nt6lqIU5pY0Qw=";
};
buildInputs = [ glib ]
++ lib.optional (stdenv ? glibc) stdenv.glibc.linuxHeaders;
buildInputs = [ glib linuxHeaders ];
nativeBuildInputs = [ pkg-config which bison ];

View file

@ -1,4 +1,4 @@
{ stdenv, lib, fetchFromGitHub, libxslt, libaio, systemd, perl
{ stdenv, lib, fetchFromGitHub, libxslt, libaio, systemd, perl, glibc
, docbook_xsl, coreutils, lsof, rdma-core, makeWrapper, sg3_utils, util-linux
}:
@ -29,8 +29,8 @@ stdenv.mkDerivation rec {
preConfigure = ''
sed -i 's|/usr/bin/||' doc/Makefile
sed -i 's|/usr/include/libaio.h|${libaio}/include/libaio.h|' usr/Makefile
sed -i 's|/usr/include/sys/|${stdenv.glibc.dev}/include/sys/|' usr/Makefile
sed -i 's|/usr/include/linux/|${stdenv.glibc.dev}/include/linux/|' usr/Makefile
sed -i 's|/usr/include/sys/|${glibc.dev}/include/sys/|' usr/Makefile
sed -i 's|/usr/include/linux/|${glibc.dev}/include/linux/|' usr/Makefile
'';
postInstall = ''

View file

@ -1,6 +1,4 @@
{lib, stdenv, fetchurl, gettext}:
assert stdenv.isLinux && stdenv ? glibc;
{lib, stdenv, fetchurl, gettext, glibc }:
stdenv.mkDerivation rec {
pname = "checkinstall";
@ -54,7 +52,7 @@ stdenv.mkDerivation rec {
substituteInPlace checkinstallrc-dist --replace /usr/local $out
substituteInPlace installwatch/create-localdecls \
--replace /usr/include/unistd.h ${stdenv.glibc.dev}/include/unistd.h
--replace /usr/include/unistd.h ${glibc.dev}/include/unistd.h
'';
postInstall =

View file

@ -1,4 +1,4 @@
{ lib, stdenv, fetchurl, which, pkg-config, gtk2, pcre, glib, libxml2
{ lib, stdenv, fetchurl, which, pkg-config, gtk2, pcre, glib, libxml2, glibc
, libsoup ? null
}:
@ -30,7 +30,7 @@ stdenv.mkDerivation rec {
sed -i -e "s/^CFLAGS = \(.*\)/CFLAGS = \1 -std=gnu89/" Makefile.in
substituteInPlace ./arch/linux/common/modules.h --replace /sbin/modinfo modinfo
substituteInPlace ./arch/linux/common/os.h --replace /lib/libc.so.6 ${stdenv.glibc.out}/lib/libc.so.6
substituteInPlace ./arch/linux/common/os.h --replace /lib/libc.so.6 ${glibc.out}/lib/libc.so.6
'';
# Makefile supports DESTDIR but not PREFIX (it hardcodes $DESTDIR/usr/).