58 lines
899 B
Nix
58 lines
899 B
Nix
|
{
|
||
|
fetchurl,
|
||
|
pkgs,
|
||
|
stdenv,
|
||
|
|
||
|
...
|
||
|
}:
|
||
|
let
|
||
|
version = "2.40";
|
||
|
pname = "glibcStandalone";
|
||
|
in
|
||
|
stdenv.mkDerivation (finalAttrs: {
|
||
|
inherit version;
|
||
|
|
||
|
pname = pname;
|
||
|
|
||
|
src = fetchurl {
|
||
|
url = "mirror://gnu/glibc/glibc-${version}.tar.xz";
|
||
|
sha256 = "sha256-GaiQF16SY9dI9ieZPeb0sa+c0h4D8IDkv7Oh+sECBaI=";
|
||
|
};
|
||
|
|
||
|
enableParallelBuilding = true;
|
||
|
|
||
|
configureFlags = [
|
||
|
"--prefix=/"
|
||
|
"--libdir=/lib"
|
||
|
"--bindir=/bin"
|
||
|
"--sysconfdir=/etc"
|
||
|
];
|
||
|
|
||
|
preConfigure =
|
||
|
''
|
||
|
export PWD_P=$(type -tP pwd)
|
||
|
for i in configure io/ftwtest-sh; do
|
||
|
sed -i "$i" -e "s^/bin/pwd^$PWD_P^g"
|
||
|
done
|
||
|
|
||
|
mkdir ../build
|
||
|
cd ../build
|
||
|
|
||
|
configureScript="`pwd`/../$sourceRoot/configure"
|
||
|
'';
|
||
|
|
||
|
nativeBuildInputs = with pkgs; [
|
||
|
bison
|
||
|
python3Minimal
|
||
|
];
|
||
|
|
||
|
outputs = [
|
||
|
"out"
|
||
|
];
|
||
|
|
||
|
preInstall = ''
|
||
|
export DESTDIR=${placeholder "out"}
|
||
|
'';
|
||
|
|
||
|
})
|