···77777878A 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.
79798080-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`).
8080+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`).
81818282The 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).
8383
+1-1
maintainers/scripts/patchelf-hints.sh
···6161 uniq;
6262 )
63636464- if test "$names" = "glibc"; then names="stdenv.glibc"; fi
6464+ if test "$names" = "glibc"; then names="glibc"; fi
6565 if echo $names | grep -c "gcc" &> /dev/null; then names="stdenv.cc.cc"; fi
66666767 if test $lib != $libPath; then
···66, callPackage
77}:
8899-assert stdenv ? glibc;
1010-119# https://download.eclipse.org/eclipse/downloads/ is the main place to
1210# find the downloads needed for new versions
1311#
···11-{ lib, stdenv, makeWrapper, openjdk, gtk2, xorg, glibcLocales, releasePath ? null }:
11+{ lib, stdenv, makeWrapper, openjdk, gtk2, xorg, glibc, glibcLocales, releasePath ? null }:
2233# To use this package, you need to download your own cplex installer from IBM
44# and override the releasePath attribute to point to the location of the file.
···5353 let
5454 libraryPath = lib.makeLibraryPath [ stdenv.cc.cc gtk2 xorg.libXtst ];
5555 in ''
5656- interpreter=${stdenv.glibc}/lib/ld-linux-x86-64.so.2
5656+ interpreter=${glibc}/lib/ld-linux-x86-64.so.2
57575858 for pgm in $out/opl/bin/x86-64_linux/oplrun $out/opl/bin/x86-64_linux/oplrunjava $out/opl/oplide/oplide;
5959 do