Revert "Merge branch 'staging'" due to glibc
The main output started to retain dependency on bootstrap-tools; see https://github.com/NixOS/nixpkgs/pull/15867#issuecomment-227949096 This reverts commitc05d829598
, reversing changes made tof073df60d6
.
This commit is contained in:
parent
21f9180d49
commit
aa9a04883e
|
@ -113,14 +113,14 @@ rec {
|
||||||
--add-flags "$vms" \
|
--add-flags "$vms" \
|
||||||
${lib.optionalString enableOCR "--prefix PATH : '${ocrProg}/bin'"} \
|
${lib.optionalString enableOCR "--prefix PATH : '${ocrProg}/bin'"} \
|
||||||
--run "testScript=\"\$(cat $out/test-script)\"" \
|
--run "testScript=\"\$(cat $out/test-script)\"" \
|
||||||
--set testScript '$testScript' \
|
--set testScript '"$testScript"' \
|
||||||
--set VLANS '${toString vlans}'
|
--set VLANS '"${toString vlans}"'
|
||||||
ln -s ${testDriver}/bin/nixos-test-driver $out/bin/nixos-run-vms
|
ln -s ${testDriver}/bin/nixos-test-driver $out/bin/nixos-run-vms
|
||||||
wrapProgram $out/bin/nixos-run-vms \
|
wrapProgram $out/bin/nixos-run-vms \
|
||||||
--add-flags "$vms" \
|
--add-flags "$vms" \
|
||||||
${lib.optionalString enableOCR "--prefix PATH : '${ocrProg}/bin'"} \
|
${lib.optionalString enableOCR "--prefix PATH : '${ocrProg}/bin'"} \
|
||||||
--set tests 'startAll; joinAll;' \
|
--set tests '"startAll; joinAll;"' \
|
||||||
--set VLANS '${toString vlans}' \
|
--set VLANS '"${toString vlans}"' \
|
||||||
${lib.optionalString (builtins.length vms == 1) "--set USE_SERIAL 1"}
|
${lib.optionalString (builtins.length vms == 1) "--set USE_SERIAL 1"}
|
||||||
''; # "
|
''; # "
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,6 @@ stdenv.mkDerivation rec {
|
||||||
buildInputs = [ qt4 qmake4Hook zlib ];
|
buildInputs = [ qt4 qmake4Hook zlib ];
|
||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
sed '1i#include <cmath>' -i common/camera.cpp
|
|
||||||
substituteInPlace common/camera.cpp --replace "isnan(" "std::isnan("
|
substituteInPlace common/camera.cpp --replace "isnan(" "std::isnan("
|
||||||
export qmakeFlags="$qmakeFlags INSTALL_PREFIX=$out"
|
export qmakeFlags="$qmakeFlags INSTALL_PREFIX=$out"
|
||||||
'';
|
'';
|
||||||
|
|
|
@ -10,18 +10,14 @@ stdenv.mkDerivation rec {
|
||||||
sha256 = "0f6y18k7db2ci6xn664zcwm1g1k04sdv7gg1yd5jk41bndjb7z8h";
|
sha256 = "0f6y18k7db2ci6xn664zcwm1g1k04sdv7gg1yd5jk41bndjb7z8h";
|
||||||
};
|
};
|
||||||
|
|
||||||
postPatch = '' # kinda icky
|
|
||||||
sed -e '/("@INSTALL@")/d' \
|
|
||||||
-e s,@INSTALL@,$out/share/photivo, \
|
|
||||||
-i Sources/ptSettings.cpp
|
|
||||||
sed '1i#include <math.h>' -i Sources/filters/ptFilter_StdCurve.cpp
|
|
||||||
'';
|
|
||||||
|
|
||||||
nativeBuildInputs = [ cmake pkgconfig ];
|
nativeBuildInputs = [ cmake pkgconfig ];
|
||||||
|
|
||||||
buildInputs = [ qt4 fftw graphicsmagick_q16 lcms2 lensfun libjpeg exiv2 liblqr1 ];
|
buildInputs = [ qt4 fftw graphicsmagick_q16 lcms2 lensfun libjpeg exiv2 liblqr1 ];
|
||||||
|
patchPhase = '' # kinda icky
|
||||||
enableParallelBuilding = true;
|
sed -e '/("@INSTALL@")/d' \
|
||||||
|
-e s,@INSTALL@,$out/share/photivo, \
|
||||||
|
-i Sources/ptSettings.cpp
|
||||||
|
'';
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
platforms = platforms.linux;
|
platforms = platforms.linux;
|
||||||
|
|
|
@ -10,10 +10,6 @@ stdenv.mkDerivation rec {
|
||||||
sha256 = "16768gyi85mkizfn874q2q9xf32knw08z27si3k5bk99492dxwzw";
|
sha256 = "16768gyi85mkizfn874q2q9xf32knw08z27si3k5bk99492dxwzw";
|
||||||
};
|
};
|
||||||
|
|
||||||
postPatch = ''
|
|
||||||
sed '1i#include <cmath>' -i src/Transformer/SpectrumCircleTransformer.cpp
|
|
||||||
'';
|
|
||||||
|
|
||||||
buildInputs = [ fftw ncurses libpulseaudio ];
|
buildInputs = [ fftw ncurses libpulseaudio ];
|
||||||
|
|
||||||
buildFlags = [ "ENABLE_PULSE=1" ];
|
buildFlags = [ "ENABLE_PULSE=1" ];
|
||||||
|
|
|
@ -13,8 +13,6 @@ let
|
||||||
sha256 = "1cw4yw7n9m2si8b7zcfyz9pyihncabxm5g39v1mxslfajxgwzmd8";
|
sha256 = "1cw4yw7n9m2si8b7zcfyz9pyihncabxm5g39v1mxslfajxgwzmd8";
|
||||||
};
|
};
|
||||||
|
|
||||||
postPatch = "sed '1i#include <math.h>' -i termite.cc";
|
|
||||||
|
|
||||||
makeFlags = [ "VERSION=v${version}" "PREFIX=" "DESTDIR=$(out)" ];
|
makeFlags = [ "VERSION=v${version}" "PREFIX=" "DESTDIR=$(out)" ];
|
||||||
|
|
||||||
buildInputs = [ pkgconfig vte gtk3 ncurses ];
|
buildInputs = [ pkgconfig vte gtk3 ncurses ];
|
||||||
|
|
|
@ -27,11 +27,6 @@ stdenv.mkDerivation rec {
|
||||||
] ++ qtInputs;
|
] ++ qtInputs;
|
||||||
|
|
||||||
patches = [ ./0001-fix-gcc-cmath-namespace-issues.patch ];
|
patches = [ ./0001-fix-gcc-cmath-namespace-issues.patch ];
|
||||||
postPatch = ''
|
|
||||||
sed '1i#include <cmath>' -i src/Vehicle/Vehicle.cc \
|
|
||||||
-i src/comm/{QGCFlightGearLink,QGCJSBSimLink}.cc \
|
|
||||||
-i src/{uas/UAS,ui/QGCDataPlot2D}.cc
|
|
||||||
'';
|
|
||||||
|
|
||||||
preConfigure = ''
|
preConfigure = ''
|
||||||
mkdir build
|
mkdir build
|
||||||
|
|
|
@ -11,15 +11,11 @@ stdenv.mkDerivation rec {
|
||||||
sha256 = "1d89ncspjd8c4mckf0nb6y3hrxpv4rjpbj868pznhvfmdgr5nvql";
|
sha256 = "1d89ncspjd8c4mckf0nb6y3hrxpv4rjpbj868pznhvfmdgr5nvql";
|
||||||
};
|
};
|
||||||
|
|
||||||
postPatch = "sed '1i#include <random>' -i src/Benchmark.cpp";
|
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
alsaLib ffmpeg libjack2 libX11 libXext libXfixes mesa pkgconfig
|
alsaLib ffmpeg libjack2 libX11 libXext libXfixes mesa pkgconfig
|
||||||
libpulseaudio qt4
|
libpulseaudio qt4
|
||||||
];
|
];
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
description = "A screen recorder for Linux";
|
description = "A screen recorder for Linux";
|
||||||
homepage = http://www.maartenbaert.be/simplescreenrecorder;
|
homepage = http://www.maartenbaert.be/simplescreenrecorder;
|
||||||
|
|
|
@ -97,14 +97,7 @@ in stdenv.mkDerivation {
|
||||||
set +x
|
set +x
|
||||||
'';
|
'';
|
||||||
|
|
||||||
patches = optional enableHardening ./hardened.patch
|
patches = optional enableHardening ./hardened.patch;
|
||||||
++ [
|
|
||||||
(fetchurl rec {
|
|
||||||
name = "fix-detect-gcc-5.4.patch";
|
|
||||||
url = "https://bugs.debian.org/cgi-bin/bugreport.cgi?att=1;bug=827193;filename=${name};msg=5";
|
|
||||||
sha256 = "0y6v5dc6fqj9iv27cl8q2g87v1kxg19129mpas4vjg7g0529v4g9";
|
|
||||||
})
|
|
||||||
];
|
|
||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
sed -i -e 's|/sbin/ifconfig|${nettools}/bin/ifconfig|' \
|
sed -i -e 's|/sbin/ifconfig|${nettools}/bin/ifconfig|' \
|
||||||
|
|
|
@ -96,7 +96,6 @@ stdenv.mkDerivation {
|
||||||
echo "-L${libc_lib}/lib" > $out/nix-support/libc-ldflags
|
echo "-L${libc_lib}/lib" > $out/nix-support/libc-ldflags
|
||||||
|
|
||||||
echo "${libc_lib}" > $out/nix-support/orig-libc
|
echo "${libc_lib}" > $out/nix-support/orig-libc
|
||||||
echo "${libc_dev}" > $out/nix-support/orig-libc-dev
|
|
||||||
''
|
''
|
||||||
|
|
||||||
+ (if nativeTools then ''
|
+ (if nativeTools then ''
|
||||||
|
|
|
@ -111,7 +111,6 @@ chmod +x "$out/bin/$crossConfig-ld"
|
||||||
# Glibc.
|
# Glibc.
|
||||||
test -n "$gcc" && echo $gcc > $out/nix-support/orig-cc
|
test -n "$gcc" && echo $gcc > $out/nix-support/orig-cc
|
||||||
test -n "$libc" && echo $libc > $out/nix-support/orig-libc
|
test -n "$libc" && echo $libc > $out/nix-support/orig-libc
|
||||||
test -n "$libc_dev" && echo $libc_dev > $out/nix-support/orig-libc-dev
|
|
||||||
|
|
||||||
doSubstitute "$addFlags" "$out/nix-support/add-flags"
|
doSubstitute "$addFlags" "$out/nix-support/add-flags"
|
||||||
|
|
||||||
|
|
|
@ -44,9 +44,7 @@ stdenv.mkDerivation {
|
||||||
ldWrapper = ./ld-wrapper.sh;
|
ldWrapper = ./ld-wrapper.sh;
|
||||||
utils = ./utils.sh;
|
utils = ./utils.sh;
|
||||||
addFlags = ./add-flags;
|
addFlags = ./add-flags;
|
||||||
inherit nativeTools nativeLibc nativePrefix gcc binutils;
|
inherit nativeTools nativeLibc nativePrefix gcc libc binutils;
|
||||||
libc = if libc ? out then libc.out else libc;
|
|
||||||
libc_dev = if libc ? dev then libc.dev else libc;
|
|
||||||
crossConfig = if cross != null then cross.config else null;
|
crossConfig = if cross != null then cross.config else null;
|
||||||
osxMinVersion = cross.osxMinVersion or null;
|
osxMinVersion = cross.osxMinVersion or null;
|
||||||
gccLibs = if gcc != null then gccLibs else null;
|
gccLibs = if gcc != null then gccLibs else null;
|
||||||
|
|
|
@ -16,7 +16,7 @@ makeWrapper() {
|
||||||
varName=${params[$((n + 1))]}
|
varName=${params[$((n + 1))]}
|
||||||
value=${params[$((n + 2))]}
|
value=${params[$((n + 2))]}
|
||||||
n=$((n + 2))
|
n=$((n + 2))
|
||||||
echo "export $varName=\"$value\"" >> $wrapper
|
echo "export $varName=$value" >> $wrapper
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test "$p" = "--unset"; then
|
if test "$p" = "--unset"; then
|
||||||
|
|
|
@ -8,7 +8,6 @@ rec {
|
||||||
runCommand = name: env: buildCommand:
|
runCommand = name: env: buildCommand:
|
||||||
stdenv.mkDerivation ({
|
stdenv.mkDerivation ({
|
||||||
inherit name buildCommand;
|
inherit name buildCommand;
|
||||||
passAsFile = [ "buildCommand" ];
|
|
||||||
} // env);
|
} // env);
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
let
|
let
|
||||||
|
|
||||||
common = { pname, sha256 }: stdenv.mkDerivation rec {
|
common = { pname, sha256 }: stdenv.mkDerivation rec {
|
||||||
name = "${pname}-1.79.1";
|
name = "${pname}-1.78.1";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "mirror://sourceforge/docbook/${name}.tar.bz2";
|
url = "mirror://sourceforge/docbook/${name}.tar.bz2";
|
||||||
|
@ -35,12 +35,12 @@ in {
|
||||||
|
|
||||||
docbook_xsl = common {
|
docbook_xsl = common {
|
||||||
pname = "docbook-xsl";
|
pname = "docbook-xsl";
|
||||||
sha256 = "0s59lihif2fr7rznckxr2kfyrvkirv76r1zvidp9b5mj28p4apvj";
|
sha256 = "0rxl013ncmz1n6ymk2idvx3hix9pdabk8xn01cpcv32wmfb753y9";
|
||||||
};
|
};
|
||||||
|
|
||||||
docbook_xsl_ns = common {
|
docbook_xsl_ns = common {
|
||||||
pname = "docbook-xsl-ns";
|
pname = "docbook-xsl-ns";
|
||||||
sha256 = "170ggf5dgjar65kkn5n33kvjr3pdinpj66nnxfx8b2avw0k91jin";
|
sha256 = "1x3sc0axk9z3i6n0jhlsmzlmb723a4sjgslm9g12by6phirdx3ng";
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,9 +34,6 @@ plasmaPackage rec {
|
||||||
})
|
})
|
||||||
./0003-tzdir.patch
|
./0003-tzdir.patch
|
||||||
];
|
];
|
||||||
postPatch = ''
|
|
||||||
sed '1i#include <cmath>' -i kcms/touchpad/src/backends/x11/synapticstouchpad.cpp
|
|
||||||
'';
|
|
||||||
NIX_CFLAGS_COMPILE = [ "-I${xorgserver.dev}/include/xorg" ];
|
NIX_CFLAGS_COMPILE = [ "-I${xorgserver.dev}/include/xorg" ];
|
||||||
cmakeFlags = [
|
cmakeFlags = [
|
||||||
"-DEvdev_INCLUDE_DIRS=${xf86inputevdev.dev}/include/xorg"
|
"-DEvdev_INCLUDE_DIRS=${xf86inputevdev.dev}/include/xorg"
|
||||||
|
|
|
@ -179,11 +179,11 @@ stdenv.mkDerivation ({
|
||||||
sed -i "${gnu_h}" \
|
sed -i "${gnu_h}" \
|
||||||
-es'|LIB_SPEC *"\(.*\)$|LIB_SPEC "${extraLibSpec} \1|g'
|
-es'|LIB_SPEC *"\(.*\)$|LIB_SPEC "${extraLibSpec} \1|g'
|
||||||
|
|
||||||
echo "setting \`NATIVE_SYSTEM_HEADER_DIR' and \`STANDARD_INCLUDE_DIR' to \`${libc.dev}/include'..."
|
echo "setting \`NATIVE_SYSTEM_HEADER_DIR' and \`STANDARD_INCLUDE_DIR' to \`${libc}/include'..."
|
||||||
sed -i "${gnu_h}" \
|
sed -i "${gnu_h}" \
|
||||||
-es'|#define STANDARD_INCLUDE_DIR.*$|#define STANDARD_INCLUDE_DIR "${libc.dev}/include"|g'
|
-es'|#define STANDARD_INCLUDE_DIR.*$|#define STANDARD_INCLUDE_DIR "${libc}/include"|g'
|
||||||
sed -i gcc/config/t-gnu \
|
sed -i gcc/config/t-gnu \
|
||||||
-es'|NATIVE_SYSTEM_HEADER_DIR.*$|NATIVE_SYSTEM_HEADER_DIR = ${libc.dev}/include|g'
|
-es'|NATIVE_SYSTEM_HEADER_DIR.*$|NATIVE_SYSTEM_HEADER_DIR = ${libc}/include|g'
|
||||||
''
|
''
|
||||||
else if cross != null || stdenv.cc.libc != null then
|
else if cross != null || stdenv.cc.libc != null then
|
||||||
# On NixOS, use the right path to the dynamic linker instead of
|
# On NixOS, use the right path to the dynamic linker instead of
|
||||||
|
@ -197,7 +197,7 @@ stdenv.mkDerivation ({
|
||||||
grep -q LIBC_DYNAMIC_LINKER "$header" || continue
|
grep -q LIBC_DYNAMIC_LINKER "$header" || continue
|
||||||
echo " fixing \`$header'..."
|
echo " fixing \`$header'..."
|
||||||
sed -i "$header" \
|
sed -i "$header" \
|
||||||
-e 's|define[[:blank:]]*\([UCG]\+\)LIBC_DYNAMIC_LINKER\([0-9]*\)[[:blank:]]"\([^\"]\+\)"$|define \1LIBC_DYNAMIC_LINKER\2 "${libc.out}\3"|g'
|
-e 's|define[[:blank:]]*\([UCG]\+\)LIBC_DYNAMIC_LINKER\([0-9]*\)[[:blank:]]"\([^\"]\+\)"$|define \1LIBC_DYNAMIC_LINKER\2 "${libc}\3"|g'
|
||||||
done
|
done
|
||||||
''
|
''
|
||||||
else null;
|
else null;
|
||||||
|
@ -205,10 +205,10 @@ stdenv.mkDerivation ({
|
||||||
inherit noSysDirs profiledCompiler staticCompiler langJava crossStageStatic
|
inherit noSysDirs profiledCompiler staticCompiler langJava crossStageStatic
|
||||||
libcCross crossMingw;
|
libcCross crossMingw;
|
||||||
|
|
||||||
nativeBuildInputs = [ texinfo which gettext ]
|
nativeBuildInputs = [ texinfo which ]
|
||||||
++ optional (perl != null) perl;
|
++ optional (perl != null) perl;
|
||||||
|
|
||||||
buildInputs = [ gmp mpfr libmpc libelf ]
|
buildInputs = [ gmp mpfr libmpc libelf gettext ]
|
||||||
++ (optional (ppl != null) ppl)
|
++ (optional (ppl != null) ppl)
|
||||||
++ (optional (cloogppl != null) cloogppl)
|
++ (optional (cloogppl != null) cloogppl)
|
||||||
++ (optional (zlib != null) zlib)
|
++ (optional (zlib != null) zlib)
|
||||||
|
@ -284,7 +284,6 @@ stdenv.mkDerivation ({
|
||||||
${if langJava && javaAntlr != null then "--with-antlr-jar=${javaAntlr.crossDrv}" else ""}
|
${if langJava && javaAntlr != null then "--with-antlr-jar=${javaAntlr.crossDrv}" else ""}
|
||||||
--with-gmp=${gmp.crossDrv}
|
--with-gmp=${gmp.crossDrv}
|
||||||
--with-mpfr=${mpfr.crossDrv}
|
--with-mpfr=${mpfr.crossDrv}
|
||||||
--with-mpc=${libmpc.crossDrv}
|
|
||||||
--disable-libstdcxx-pch
|
--disable-libstdcxx-pch
|
||||||
--without-included-gettext
|
--without-included-gettext
|
||||||
--with-system-zlib
|
--with-system-zlib
|
||||||
|
@ -347,28 +346,15 @@ stdenv.mkDerivation ({
|
||||||
++ optional (libpthread != null) libpthread)));
|
++ optional (libpthread != null) libpthread)));
|
||||||
|
|
||||||
EXTRA_TARGET_CFLAGS =
|
EXTRA_TARGET_CFLAGS =
|
||||||
if cross != null && libcCross != null then [
|
if cross != null && libcCross != null
|
||||||
"-idirafter ${libcCross.dev}/include"
|
then "-idirafter ${libcCross}/include"
|
||||||
]
|
|
||||||
++ optionals (! crossStageStatic) [
|
|
||||||
"-B${libcCross.out}/lib"
|
|
||||||
]
|
|
||||||
else null;
|
else null;
|
||||||
|
|
||||||
EXTRA_TARGET_LDFLAGS =
|
EXTRA_TARGET_LDFLAGS =
|
||||||
if cross != null && libcCross != null then [
|
if cross != null && libcCross != null
|
||||||
"-Wl,-L${libcCross.out}/lib"
|
then "-B${libcCross}/lib -Wl,-L${libcCross}/lib" +
|
||||||
]
|
(optionalString (libpthreadCross != null)
|
||||||
++ (if crossStageStatic then [
|
" -L${libpthreadCross}/lib -Wl,${libpthreadCross.TARGET_LDFLAGS}")
|
||||||
"-B${libcCross.out}/lib"
|
|
||||||
] else [
|
|
||||||
"-Wl,-rpath,${libcCross.out}/lib"
|
|
||||||
"-Wl,-rpath-link,${libcCross.out}/lib"
|
|
||||||
])
|
|
||||||
++ optionals (libpthreadCross != null) [
|
|
||||||
"-L${libpthreadCross}/lib"
|
|
||||||
"-Wl,${libpthreadCross.TARGET_LDFLAGS}"
|
|
||||||
]
|
|
||||||
else null;
|
else null;
|
||||||
|
|
||||||
passthru = { inherit langC langCC langAda langFortran langVhdl
|
passthru = { inherit langC langCC langAda langFortran langVhdl
|
||||||
|
|
|
@ -209,9 +209,7 @@ postInstall() {
|
||||||
# Move runtime libraries to $lib.
|
# Move runtime libraries to $lib.
|
||||||
mkdir -p $lib/lib
|
mkdir -p $lib/lib
|
||||||
ln -s lib $lib/lib64
|
ln -s lib $lib/lib64
|
||||||
moveToOutput "lib/lib*.so" "$lib"
|
mv -v $out/lib/lib*.so $out/lib/lib*.so.*[0-9] $out/lib/*.la $lib/lib/
|
||||||
moveToOutput "lib/lib*.so.*[0-9]" "$lib"
|
|
||||||
moveToOutput "lib/*.la" "$lib"
|
|
||||||
for i in $lib/lib/*.la; do
|
for i in $lib/lib/*.la; do
|
||||||
substituteInPlace $i --replace $out $lib
|
substituteInPlace $i --replace $out $lib
|
||||||
done
|
done
|
||||||
|
|
|
@ -229,11 +229,11 @@ stdenv.mkDerivation ({
|
||||||
sed -i "${gnu_h}" \
|
sed -i "${gnu_h}" \
|
||||||
-es'|LIB_SPEC *"\(.*\)$|LIB_SPEC "${extraLibSpec} \1|g'
|
-es'|LIB_SPEC *"\(.*\)$|LIB_SPEC "${extraLibSpec} \1|g'
|
||||||
|
|
||||||
echo "setting \`NATIVE_SYSTEM_HEADER_DIR' and \`STANDARD_INCLUDE_DIR' to \`${libc.dev}/include'..."
|
echo "setting \`NATIVE_SYSTEM_HEADER_DIR' and \`STANDARD_INCLUDE_DIR' to \`${libc}/include'..."
|
||||||
sed -i "${gnu_h}" \
|
sed -i "${gnu_h}" \
|
||||||
-es'|#define STANDARD_INCLUDE_DIR.*$|#define STANDARD_INCLUDE_DIR "${libc.dev}/include"|g'
|
-es'|#define STANDARD_INCLUDE_DIR.*$|#define STANDARD_INCLUDE_DIR "${libc}/include"|g'
|
||||||
sed -i gcc/config/t-gnu \
|
sed -i gcc/config/t-gnu \
|
||||||
-es'|NATIVE_SYSTEM_HEADER_DIR.*$|NATIVE_SYSTEM_HEADER_DIR = ${libc.dev}/include|g'
|
-es'|NATIVE_SYSTEM_HEADER_DIR.*$|NATIVE_SYSTEM_HEADER_DIR = ${libc}/include|g'
|
||||||
''
|
''
|
||||||
else if cross != null || stdenv.cc.libc != null then
|
else if cross != null || stdenv.cc.libc != null then
|
||||||
# On NixOS, use the right path to the dynamic linker instead of
|
# On NixOS, use the right path to the dynamic linker instead of
|
||||||
|
@ -247,7 +247,7 @@ stdenv.mkDerivation ({
|
||||||
grep -q LIBC_DYNAMIC_LINKER "$header" || continue
|
grep -q LIBC_DYNAMIC_LINKER "$header" || continue
|
||||||
echo " fixing \`$header'..."
|
echo " fixing \`$header'..."
|
||||||
sed -i "$header" \
|
sed -i "$header" \
|
||||||
-e 's|define[[:blank:]]*\([UCG]\+\)LIBC_DYNAMIC_LINKER\([0-9]*\)[[:blank:]]"\([^\"]\+\)"$|define \1LIBC_DYNAMIC_LINKER\2 "${libc.out}\3"|g'
|
-e 's|define[[:blank:]]*\([UCG]\+\)LIBC_DYNAMIC_LINKER\([0-9]*\)[[:blank:]]"\([^\"]\+\)"$|define \1LIBC_DYNAMIC_LINKER\2 "${libc}\3"|g'
|
||||||
done
|
done
|
||||||
''
|
''
|
||||||
else null;
|
else null;
|
||||||
|
@ -357,7 +357,6 @@ stdenv.mkDerivation ({
|
||||||
${if langJava && javaAntlr != null then "--with-antlr-jar=${javaAntlr.crossDrv}" else ""}
|
${if langJava && javaAntlr != null then "--with-antlr-jar=${javaAntlr.crossDrv}" else ""}
|
||||||
--with-gmp=${gmp.crossDrv}
|
--with-gmp=${gmp.crossDrv}
|
||||||
--with-mpfr=${mpfr.crossDrv}
|
--with-mpfr=${mpfr.crossDrv}
|
||||||
--with-mpc=${libmpc.crossDrv}
|
|
||||||
--disable-libstdcxx-pch
|
--disable-libstdcxx-pch
|
||||||
--without-included-gettext
|
--without-included-gettext
|
||||||
--with-system-zlib
|
--with-system-zlib
|
||||||
|
@ -422,28 +421,15 @@ stdenv.mkDerivation ({
|
||||||
++ optional (libpthread != null) libpthread)));
|
++ optional (libpthread != null) libpthread)));
|
||||||
|
|
||||||
EXTRA_TARGET_CFLAGS =
|
EXTRA_TARGET_CFLAGS =
|
||||||
if cross != null && libcCross != null then [
|
if cross != null && libcCross != null
|
||||||
"-idirafter ${libcCross.dev}/include"
|
then "-idirafter ${libcCross}/include"
|
||||||
]
|
|
||||||
++ optionals (! crossStageStatic) [
|
|
||||||
"-B${libcCross.out}/lib"
|
|
||||||
]
|
|
||||||
else null;
|
else null;
|
||||||
|
|
||||||
EXTRA_TARGET_LDFLAGS =
|
EXTRA_TARGET_LDFLAGS =
|
||||||
if cross != null && libcCross != null then [
|
if cross != null && libcCross != null
|
||||||
"-Wl,-L${libcCross.out}/lib"
|
then "-B${libcCross}/lib -Wl,-L${libcCross}/lib" +
|
||||||
]
|
(optionalString (libpthreadCross != null)
|
||||||
++ (if crossStageStatic then [
|
" -L${libpthreadCross}/lib -Wl,${libpthreadCross.TARGET_LDFLAGS}")
|
||||||
"-B${libcCross.out}/lib"
|
|
||||||
] else [
|
|
||||||
"-Wl,-rpath,${libcCross.out}/lib"
|
|
||||||
"-Wl,-rpath-link,${libcCross.out}/lib"
|
|
||||||
])
|
|
||||||
++ optionals (libpthreadCross != null) [
|
|
||||||
"-L${libpthreadCross}/lib"
|
|
||||||
"-Wl,${libpthreadCross.TARGET_LDFLAGS}"
|
|
||||||
]
|
|
||||||
else null;
|
else null;
|
||||||
|
|
||||||
passthru = { inherit langC langCC langAda langFortran langVhdl
|
passthru = { inherit langC langCC langAda langFortran langVhdl
|
||||||
|
|
|
@ -164,8 +164,8 @@ let version = "4.8.5";
|
||||||
" --disable-libatomic " + # libatomic requires libc
|
" --disable-libatomic " + # libatomic requires libc
|
||||||
" --disable-decimal-float" # libdecnumber requires libc
|
" --disable-decimal-float" # libdecnumber requires libc
|
||||||
else
|
else
|
||||||
(if crossDarwin then " --with-sysroot=${libcCross.out}/share/sysroot"
|
(if crossDarwin then " --with-sysroot=${libcCross}/share/sysroot"
|
||||||
else " --with-headers=${libcCross.dev}/include") +
|
else " --with-headers=${libcCross}/include") +
|
||||||
# Ensure that -print-prog-name is able to find the correct programs.
|
# Ensure that -print-prog-name is able to find the correct programs.
|
||||||
(stdenv.lib.optionalString (crossMingw || crossDarwin) (
|
(stdenv.lib.optionalString (crossMingw || crossDarwin) (
|
||||||
" --with-as=${binutilsCross}/bin/${cross.config}-as" +
|
" --with-as=${binutilsCross}/bin/${cross.config}-as" +
|
||||||
|
@ -255,9 +255,9 @@ stdenv.mkDerivation ({
|
||||||
sed -i "${gnu_h}" \
|
sed -i "${gnu_h}" \
|
||||||
-es'|LIB_SPEC *"\(.*\)$|LIB_SPEC "${extraLibSpec} \1|g'
|
-es'|LIB_SPEC *"\(.*\)$|LIB_SPEC "${extraLibSpec} \1|g'
|
||||||
|
|
||||||
echo "setting \`NATIVE_SYSTEM_HEADER_DIR' and \`STANDARD_INCLUDE_DIR' to \`${libc.dev}/include'..."
|
echo "setting \`NATIVE_SYSTEM_HEADER_DIR' and \`STANDARD_INCLUDE_DIR' to \`${libc}/include'..."
|
||||||
sed -i "${gnu_h}" \
|
sed -i "${gnu_h}" \
|
||||||
-es'|#define STANDARD_INCLUDE_DIR.*$|#define STANDARD_INCLUDE_DIR "${libc.dev}/include"|g'
|
-es'|#define STANDARD_INCLUDE_DIR.*$|#define STANDARD_INCLUDE_DIR "${libc}/include"|g'
|
||||||
''
|
''
|
||||||
else if cross != null || stdenv.cc.libc != null then
|
else if cross != null || stdenv.cc.libc != null then
|
||||||
# On NixOS, use the right path to the dynamic linker instead of
|
# On NixOS, use the right path to the dynamic linker instead of
|
||||||
|
@ -271,7 +271,7 @@ stdenv.mkDerivation ({
|
||||||
grep -q LIBC_DYNAMIC_LINKER "$header" || continue
|
grep -q LIBC_DYNAMIC_LINKER "$header" || continue
|
||||||
echo " fixing \`$header'..."
|
echo " fixing \`$header'..."
|
||||||
sed -i "$header" \
|
sed -i "$header" \
|
||||||
-e 's|define[[:blank:]]*\([UCG]\+\)LIBC_DYNAMIC_LINKER\([0-9]*\)[[:blank:]]"\([^\"]\+\)"$|define \1LIBC_DYNAMIC_LINKER\2 "${libc.out}\3"|g'
|
-e 's|define[[:blank:]]*\([UCG]\+\)LIBC_DYNAMIC_LINKER\([0-9]*\)[[:blank:]]"\([^\"]\+\)"$|define \1LIBC_DYNAMIC_LINKER\2 "${libc}\3"|g'
|
||||||
done
|
done
|
||||||
''
|
''
|
||||||
else null;
|
else null;
|
||||||
|
@ -415,7 +415,6 @@ stdenv.mkDerivation ({
|
||||||
${if langJava && javaAntlr != null then "--with-antlr-jar=${javaAntlr.crossDrv}" else ""}
|
${if langJava && javaAntlr != null then "--with-antlr-jar=${javaAntlr.crossDrv}" else ""}
|
||||||
--with-gmp=${gmp.crossDrv}
|
--with-gmp=${gmp.crossDrv}
|
||||||
--with-mpfr=${mpfr.crossDrv}
|
--with-mpfr=${mpfr.crossDrv}
|
||||||
--with-mpc=${libmpc.crossDrv}
|
|
||||||
--disable-libstdcxx-pch
|
--disable-libstdcxx-pch
|
||||||
--without-included-gettext
|
--without-included-gettext
|
||||||
--with-system-zlib
|
--with-system-zlib
|
||||||
|
@ -483,28 +482,15 @@ stdenv.mkDerivation ({
|
||||||
++ optional (libpthread != null) libpthread)));
|
++ optional (libpthread != null) libpthread)));
|
||||||
|
|
||||||
EXTRA_TARGET_CFLAGS =
|
EXTRA_TARGET_CFLAGS =
|
||||||
if cross != null && libcCross != null then [
|
if cross != null && libcCross != null
|
||||||
"-idirafter ${libcCross.dev}/include"
|
then "-idirafter ${libcCross}/include"
|
||||||
]
|
|
||||||
++ optionals (! crossStageStatic) [
|
|
||||||
"-B${libcCross.out}/lib"
|
|
||||||
]
|
|
||||||
else null;
|
else null;
|
||||||
|
|
||||||
EXTRA_TARGET_LDFLAGS =
|
EXTRA_TARGET_LDFLAGS =
|
||||||
if cross != null && libcCross != null then [
|
if cross != null && libcCross != null
|
||||||
"-Wl,-L${libcCross.out}/lib"
|
then "-B${libcCross}/lib -Wl,-L${libcCross}/lib" +
|
||||||
]
|
(optionalString (libpthreadCross != null)
|
||||||
++ (if crossStageStatic then [
|
" -L${libpthreadCross}/lib -Wl,${libpthreadCross.TARGET_LDFLAGS}")
|
||||||
"-B${libcCross.out}/lib"
|
|
||||||
] else [
|
|
||||||
"-Wl,-rpath,${libcCross.out}/lib"
|
|
||||||
"-Wl,-rpath-link,${libcCross.out}/lib"
|
|
||||||
])
|
|
||||||
++ optionals (libpthreadCross != null) [
|
|
||||||
"-L${libpthreadCross}/lib"
|
|
||||||
"-Wl,${libpthreadCross.TARGET_LDFLAGS}"
|
|
||||||
]
|
|
||||||
else null;
|
else null;
|
||||||
|
|
||||||
passthru =
|
passthru =
|
||||||
|
|
|
@ -166,8 +166,8 @@ let version = "4.9.3";
|
||||||
" --disable-libatomic " + # libatomic requires libc
|
" --disable-libatomic " + # libatomic requires libc
|
||||||
" --disable-decimal-float" # libdecnumber requires libc
|
" --disable-decimal-float" # libdecnumber requires libc
|
||||||
else
|
else
|
||||||
(if crossDarwin then " --with-sysroot=${libcCross.out}/share/sysroot"
|
(if crossDarwin then " --with-sysroot=${libcCross}/share/sysroot"
|
||||||
else " --with-headers=${libcCross.dev}/include") +
|
else " --with-headers=${libcCross}/include") +
|
||||||
# Ensure that -print-prog-name is able to find the correct programs.
|
# Ensure that -print-prog-name is able to find the correct programs.
|
||||||
(stdenv.lib.optionalString (crossMingw || crossDarwin) (
|
(stdenv.lib.optionalString (crossMingw || crossDarwin) (
|
||||||
" --with-as=${binutilsCross}/bin/${cross.config}-as" +
|
" --with-as=${binutilsCross}/bin/${cross.config}-as" +
|
||||||
|
@ -258,9 +258,9 @@ stdenv.mkDerivation ({
|
||||||
sed -i "${gnu_h}" \
|
sed -i "${gnu_h}" \
|
||||||
-es'|LIB_SPEC *"\(.*\)$|LIB_SPEC "${extraLibSpec} \1|g'
|
-es'|LIB_SPEC *"\(.*\)$|LIB_SPEC "${extraLibSpec} \1|g'
|
||||||
|
|
||||||
echo "setting \`NATIVE_SYSTEM_HEADER_DIR' and \`STANDARD_INCLUDE_DIR' to \`${libc.dev}/include'..."
|
echo "setting \`NATIVE_SYSTEM_HEADER_DIR' and \`STANDARD_INCLUDE_DIR' to \`${libc}/include'..."
|
||||||
sed -i "${gnu_h}" \
|
sed -i "${gnu_h}" \
|
||||||
-es'|#define STANDARD_INCLUDE_DIR.*$|#define STANDARD_INCLUDE_DIR "${libc.dev}/include"|g'
|
-es'|#define STANDARD_INCLUDE_DIR.*$|#define STANDARD_INCLUDE_DIR "${libc}/include"|g'
|
||||||
''
|
''
|
||||||
else if cross != null || stdenv.cc.libc != null then
|
else if cross != null || stdenv.cc.libc != null then
|
||||||
# On NixOS, use the right path to the dynamic linker instead of
|
# On NixOS, use the right path to the dynamic linker instead of
|
||||||
|
@ -274,7 +274,7 @@ stdenv.mkDerivation ({
|
||||||
grep -q LIBC_DYNAMIC_LINKER "$header" || continue
|
grep -q LIBC_DYNAMIC_LINKER "$header" || continue
|
||||||
echo " fixing \`$header'..."
|
echo " fixing \`$header'..."
|
||||||
sed -i "$header" \
|
sed -i "$header" \
|
||||||
-e 's|define[[:blank:]]*\([UCG]\+\)LIBC_DYNAMIC_LINKER\([0-9]*\)[[:blank:]]"\([^\"]\+\)"$|define \1LIBC_DYNAMIC_LINKER\2 "${libc.out}\3"|g'
|
-e 's|define[[:blank:]]*\([UCG]\+\)LIBC_DYNAMIC_LINKER\([0-9]*\)[[:blank:]]"\([^\"]\+\)"$|define \1LIBC_DYNAMIC_LINKER\2 "${libc}\3"|g'
|
||||||
done
|
done
|
||||||
''
|
''
|
||||||
else null;
|
else null;
|
||||||
|
@ -422,7 +422,6 @@ stdenv.mkDerivation ({
|
||||||
${if langJava && javaAntlr != null then "--with-antlr-jar=${javaAntlr.crossDrv}" else ""}
|
${if langJava && javaAntlr != null then "--with-antlr-jar=${javaAntlr.crossDrv}" else ""}
|
||||||
--with-gmp=${gmp.crossDrv}
|
--with-gmp=${gmp.crossDrv}
|
||||||
--with-mpfr=${mpfr.crossDrv}
|
--with-mpfr=${mpfr.crossDrv}
|
||||||
--with-mpc=${libmpc.crossDrv}
|
|
||||||
--disable-libstdcxx-pch
|
--disable-libstdcxx-pch
|
||||||
--without-included-gettext
|
--without-included-gettext
|
||||||
--with-system-zlib
|
--with-system-zlib
|
||||||
|
@ -490,28 +489,15 @@ stdenv.mkDerivation ({
|
||||||
++ optional (libpthread != null) libpthread)));
|
++ optional (libpthread != null) libpthread)));
|
||||||
|
|
||||||
EXTRA_TARGET_CFLAGS =
|
EXTRA_TARGET_CFLAGS =
|
||||||
if cross != null && libcCross != null then [
|
if cross != null && libcCross != null
|
||||||
"-idirafter ${libcCross.dev}/include"
|
then "-idirafter ${libcCross}/include"
|
||||||
]
|
|
||||||
++ optionals (! crossStageStatic) [
|
|
||||||
"-B${libcCross.out}/lib"
|
|
||||||
]
|
|
||||||
else null;
|
else null;
|
||||||
|
|
||||||
EXTRA_TARGET_LDFLAGS =
|
EXTRA_TARGET_LDFLAGS =
|
||||||
if cross != null && libcCross != null then [
|
if cross != null && libcCross != null
|
||||||
"-Wl,-L${libcCross.out}/lib"
|
then "-B${libcCross}/lib -Wl,-L${libcCross}/lib" +
|
||||||
]
|
(optionalString (libpthreadCross != null)
|
||||||
++ (if crossStageStatic then [
|
" -L${libpthreadCross}/lib -Wl,${libpthreadCross.TARGET_LDFLAGS}")
|
||||||
"-B${libcCross.out}/lib"
|
|
||||||
] else [
|
|
||||||
"-Wl,-rpath,${libcCross.out}/lib"
|
|
||||||
"-Wl,-rpath-link,${libcCross.out}/lib"
|
|
||||||
])
|
|
||||||
++ optionals (libpthreadCross != null) [
|
|
||||||
"-L${libpthreadCross}/lib"
|
|
||||||
"-Wl,${libpthreadCross.TARGET_LDFLAGS}"
|
|
||||||
]
|
|
||||||
else null;
|
else null;
|
||||||
|
|
||||||
passthru =
|
passthru =
|
||||||
|
|
|
@ -58,8 +58,7 @@ assert langGo -> langCC;
|
||||||
with stdenv.lib;
|
with stdenv.lib;
|
||||||
with builtins;
|
with builtins;
|
||||||
|
|
||||||
let version = "5.4.0";
|
let version = "5.3.0";
|
||||||
sha256 = "0fihlcy5hnksdxk0sn6bvgnyq8gfrgs8m794b1jxwd1dxinzg3b0";
|
|
||||||
|
|
||||||
# Whether building a cross-compiler for GNU/Hurd.
|
# Whether building a cross-compiler for GNU/Hurd.
|
||||||
crossGNU = cross != null && cross.config == "i586-pc-gnu";
|
crossGNU = cross != null && cross.config == "i586-pc-gnu";
|
||||||
|
@ -166,8 +165,8 @@ let version = "5.4.0";
|
||||||
" --disable-libatomic " + # libatomic requires libc
|
" --disable-libatomic " + # libatomic requires libc
|
||||||
" --disable-decimal-float" # libdecnumber requires libc
|
" --disable-decimal-float" # libdecnumber requires libc
|
||||||
else
|
else
|
||||||
(if crossDarwin then " --with-sysroot=${getLib libcCross}/share/sysroot"
|
(if crossDarwin then " --with-sysroot=${libcCross}/share/sysroot"
|
||||||
else " --with-headers=${getDev libcCross}/include") +
|
else " --with-headers=${libcCross}/include") +
|
||||||
# Ensure that -print-prog-name is able to find the correct programs.
|
# Ensure that -print-prog-name is able to find the correct programs.
|
||||||
(stdenv.lib.optionalString (crossMingw || crossDarwin) (
|
(stdenv.lib.optionalString (crossMingw || crossDarwin) (
|
||||||
" --with-as=${binutilsCross}/bin/${cross.config}-as" +
|
" --with-as=${binutilsCross}/bin/${cross.config}-as" +
|
||||||
|
@ -213,7 +212,7 @@ stdenv.mkDerivation ({
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "mirror://gnu/gcc/gcc-${version}/gcc-${version}.tar.bz2";
|
url = "mirror://gnu/gcc/gcc-${version}/gcc-${version}.tar.bz2";
|
||||||
inherit sha256;
|
sha256 = "1ny4smkp5bzs3cp8ss7pl6lk8yss0d9m4av1mvdp72r1x695akxq";
|
||||||
};
|
};
|
||||||
|
|
||||||
inherit patches;
|
inherit patches;
|
||||||
|
@ -257,9 +256,9 @@ stdenv.mkDerivation ({
|
||||||
sed -i "${gnu_h}" \
|
sed -i "${gnu_h}" \
|
||||||
-es'|LIB_SPEC *"\(.*\)$|LIB_SPEC "${extraLibSpec} \1|g'
|
-es'|LIB_SPEC *"\(.*\)$|LIB_SPEC "${extraLibSpec} \1|g'
|
||||||
|
|
||||||
echo "setting \`NATIVE_SYSTEM_HEADER_DIR' and \`STANDARD_INCLUDE_DIR' to \`${libc.dev}/include'..."
|
echo "setting \`NATIVE_SYSTEM_HEADER_DIR' and \`STANDARD_INCLUDE_DIR' to \`${libc}/include'..."
|
||||||
sed -i "${gnu_h}" \
|
sed -i "${gnu_h}" \
|
||||||
-es'|#define STANDARD_INCLUDE_DIR.*$|#define STANDARD_INCLUDE_DIR "${libc.dev}/include"|g'
|
-es'|#define STANDARD_INCLUDE_DIR.*$|#define STANDARD_INCLUDE_DIR "${libc}/include"|g'
|
||||||
''
|
''
|
||||||
else if cross != null || stdenv.cc.libc != null then
|
else if cross != null || stdenv.cc.libc != null then
|
||||||
# On NixOS, use the right path to the dynamic linker instead of
|
# On NixOS, use the right path to the dynamic linker instead of
|
||||||
|
@ -273,7 +272,7 @@ stdenv.mkDerivation ({
|
||||||
grep -q LIBC_DYNAMIC_LINKER "$header" || continue
|
grep -q LIBC_DYNAMIC_LINKER "$header" || continue
|
||||||
echo " fixing \`$header'..."
|
echo " fixing \`$header'..."
|
||||||
sed -i "$header" \
|
sed -i "$header" \
|
||||||
-e 's|define[[:blank:]]*\([UCG]\+\)LIBC_DYNAMIC_LINKER\([0-9]*\)[[:blank:]]"\([^\"]\+\)"$|define \1LIBC_DYNAMIC_LINKER\2 "${libc.out}\3"|g'
|
-e 's|define[[:blank:]]*\([UCG]\+\)LIBC_DYNAMIC_LINKER\([0-9]*\)[[:blank:]]"\([^\"]\+\)"$|define \1LIBC_DYNAMIC_LINKER\2 "${libc}\3"|g'
|
||||||
done
|
done
|
||||||
''
|
''
|
||||||
else null;
|
else null;
|
||||||
|
@ -416,7 +415,6 @@ stdenv.mkDerivation ({
|
||||||
${if langJava && javaAntlr != null then "--with-antlr-jar=${javaAntlr.crossDrv}" else ""}
|
${if langJava && javaAntlr != null then "--with-antlr-jar=${javaAntlr.crossDrv}" else ""}
|
||||||
--with-gmp=${gmp.crossDrv}
|
--with-gmp=${gmp.crossDrv}
|
||||||
--with-mpfr=${mpfr.crossDrv}
|
--with-mpfr=${mpfr.crossDrv}
|
||||||
--with-mpc=${libmpc.crossDrv}
|
|
||||||
--disable-libstdcxx-pch
|
--disable-libstdcxx-pch
|
||||||
--without-included-gettext
|
--without-included-gettext
|
||||||
--with-system-zlib
|
--with-system-zlib
|
||||||
|
@ -484,28 +482,15 @@ stdenv.mkDerivation ({
|
||||||
++ optional (libpthread != null) libpthread)));
|
++ optional (libpthread != null) libpthread)));
|
||||||
|
|
||||||
EXTRA_TARGET_CFLAGS =
|
EXTRA_TARGET_CFLAGS =
|
||||||
if cross != null && libcCross != null then [
|
if cross != null && libcCross != null
|
||||||
"-idirafter ${getDev libcCross}/include"
|
then "-idirafter ${libcCross}/include"
|
||||||
]
|
|
||||||
++ optionals (! crossStageStatic) [
|
|
||||||
"-B${libcCross.out}/lib"
|
|
||||||
]
|
|
||||||
else null;
|
else null;
|
||||||
|
|
||||||
EXTRA_TARGET_LDFLAGS =
|
EXTRA_TARGET_LDFLAGS =
|
||||||
if cross != null && libcCross != null then [
|
if cross != null && libcCross != null
|
||||||
"-Wl,-L${libcCross.out}/lib"
|
then "-B${libcCross}/lib -Wl,-L${libcCross}/lib" +
|
||||||
]
|
(optionalString (libpthreadCross != null)
|
||||||
++ (if crossStageStatic then [
|
" -L${libpthreadCross}/lib -Wl,${libpthreadCross.TARGET_LDFLAGS}")
|
||||||
"-B${libcCross.out}/lib"
|
|
||||||
] else [
|
|
||||||
"-Wl,-rpath,${libcCross.out}/lib"
|
|
||||||
"-Wl,-rpath-link,${libcCross.out}/lib"
|
|
||||||
])
|
|
||||||
++ optionals (libpthreadCross != null) [
|
|
||||||
"-L${libpthreadCross}/lib"
|
|
||||||
"-Wl,${libpthreadCross.TARGET_LDFLAGS}"
|
|
||||||
]
|
|
||||||
else null;
|
else null;
|
||||||
|
|
||||||
passthru =
|
passthru =
|
||||||
|
|
|
@ -165,8 +165,8 @@ let version = "6.1.0";
|
||||||
" --disable-libatomic " + # libatomic requires libc
|
" --disable-libatomic " + # libatomic requires libc
|
||||||
" --disable-decimal-float" # libdecnumber requires libc
|
" --disable-decimal-float" # libdecnumber requires libc
|
||||||
else
|
else
|
||||||
(if crossDarwin then " --with-sysroot=${libcCross.out}/share/sysroot"
|
(if crossDarwin then " --with-sysroot=${libcCross}/share/sysroot"
|
||||||
else " --with-headers=${libcCross.dev}/include") +
|
else " --with-headers=${libcCross}/include") +
|
||||||
# Ensure that -print-prog-name is able to find the correct programs.
|
# Ensure that -print-prog-name is able to find the correct programs.
|
||||||
(stdenv.lib.optionalString (crossMingw || crossDarwin) (
|
(stdenv.lib.optionalString (crossMingw || crossDarwin) (
|
||||||
" --with-as=${binutilsCross}/bin/${cross.config}-as" +
|
" --with-as=${binutilsCross}/bin/${cross.config}-as" +
|
||||||
|
@ -256,9 +256,9 @@ stdenv.mkDerivation ({
|
||||||
sed -i "${gnu_h}" \
|
sed -i "${gnu_h}" \
|
||||||
-es'|LIB_SPEC *"\(.*\)$|LIB_SPEC "${extraLibSpec} \1|g'
|
-es'|LIB_SPEC *"\(.*\)$|LIB_SPEC "${extraLibSpec} \1|g'
|
||||||
|
|
||||||
echo "setting \`NATIVE_SYSTEM_HEADER_DIR' and \`STANDARD_INCLUDE_DIR' to \`${libc.dev}/include'..."
|
echo "setting \`NATIVE_SYSTEM_HEADER_DIR' and \`STANDARD_INCLUDE_DIR' to \`${libc}/include'..."
|
||||||
sed -i "${gnu_h}" \
|
sed -i "${gnu_h}" \
|
||||||
-es'|#define STANDARD_INCLUDE_DIR.*$|#define STANDARD_INCLUDE_DIR "${libc.dev}/include"|g'
|
-es'|#define STANDARD_INCLUDE_DIR.*$|#define STANDARD_INCLUDE_DIR "${libc}/include"|g'
|
||||||
''
|
''
|
||||||
else if cross != null || stdenv.cc.libc != null then
|
else if cross != null || stdenv.cc.libc != null then
|
||||||
# On NixOS, use the right path to the dynamic linker instead of
|
# On NixOS, use the right path to the dynamic linker instead of
|
||||||
|
@ -272,7 +272,7 @@ stdenv.mkDerivation ({
|
||||||
grep -q LIBC_DYNAMIC_LINKER "$header" || continue
|
grep -q LIBC_DYNAMIC_LINKER "$header" || continue
|
||||||
echo " fixing \`$header'..."
|
echo " fixing \`$header'..."
|
||||||
sed -i "$header" \
|
sed -i "$header" \
|
||||||
-e 's|define[[:blank:]]*\([UCG]\+\)LIBC_DYNAMIC_LINKER\([0-9]*\)[[:blank:]]"\([^\"]\+\)"$|define \1LIBC_DYNAMIC_LINKER\2 "${libc.out}\3"|g'
|
-e 's|define[[:blank:]]*\([UCG]\+\)LIBC_DYNAMIC_LINKER\([0-9]*\)[[:blank:]]"\([^\"]\+\)"$|define \1LIBC_DYNAMIC_LINKER\2 "${libc}\3"|g'
|
||||||
done
|
done
|
||||||
''
|
''
|
||||||
else null;
|
else null;
|
||||||
|
@ -482,28 +482,15 @@ stdenv.mkDerivation ({
|
||||||
++ optional (libpthread != null) libpthread)));
|
++ optional (libpthread != null) libpthread)));
|
||||||
|
|
||||||
EXTRA_TARGET_CFLAGS =
|
EXTRA_TARGET_CFLAGS =
|
||||||
if cross != null && libcCross != null then [
|
if cross != null && libcCross != null
|
||||||
"-idirafter ${libcCross.dev}/include"
|
then "-idirafter ${libcCross}/include"
|
||||||
]
|
|
||||||
++ optionals (! crossStageStatic) [
|
|
||||||
"-B${libcCross.out}/lib"
|
|
||||||
]
|
|
||||||
else null;
|
else null;
|
||||||
|
|
||||||
EXTRA_TARGET_LDFLAGS =
|
EXTRA_TARGET_LDFLAGS =
|
||||||
if cross != null && libcCross != null then [
|
if cross != null && libcCross != null
|
||||||
"-Wl,-L${libcCross.out}/lib"
|
then "-B${libcCross}/lib -Wl,-L${libcCross}/lib" +
|
||||||
]
|
(optionalString (libpthreadCross != null)
|
||||||
++ (if crossStageStatic then [
|
" -L${libpthreadCross}/lib -Wl,${libpthreadCross.TARGET_LDFLAGS}")
|
||||||
"-B${libcCross.out}/lib"
|
|
||||||
] else [
|
|
||||||
"-Wl,-rpath,${libcCross.out}/lib"
|
|
||||||
"-Wl,-rpath-link,${libcCross.out}/lib"
|
|
||||||
])
|
|
||||||
++ optionals (libpthreadCross != null) [
|
|
||||||
"-L${libpthreadCross}/lib"
|
|
||||||
"-Wl,${libpthreadCross.TARGET_LDFLAGS}"
|
|
||||||
]
|
|
||||||
else null;
|
else null;
|
||||||
|
|
||||||
passthru =
|
passthru =
|
||||||
|
|
|
@ -70,6 +70,10 @@ if test "$noSysDirs" = "1"; then
|
||||||
# gcj in.
|
# gcj in.
|
||||||
unset LIBRARY_PATH
|
unset LIBRARY_PATH
|
||||||
unset CPATH
|
unset CPATH
|
||||||
|
if test -z "$crossStageStatic"; then
|
||||||
|
EXTRA_TARGET_CFLAGS="-B${libcCross}/lib -idirafter ${libcCross}/include"
|
||||||
|
EXTRA_TARGET_LDFLAGS="-Wl,-L${libcCross}/lib -Wl,-rpath,${libcCross}/lib -Wl,-rpath-link,${libcCross}/lib"
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
if test -z "$NIX_CC_CROSS"; then
|
if test -z "$NIX_CC_CROSS"; then
|
||||||
EXTRA_TARGET_CFLAGS="$EXTRA_FLAGS"
|
EXTRA_TARGET_CFLAGS="$EXTRA_FLAGS"
|
||||||
|
@ -86,16 +90,15 @@ if test "$noSysDirs" = "1"; then
|
||||||
extraFlags="$(cat $NIX_CC_CROSS/nix-support/libc-cflags)"
|
extraFlags="$(cat $NIX_CC_CROSS/nix-support/libc-cflags)"
|
||||||
extraLDFlags="$(cat $NIX_CC_CROSS/nix-support/libc-ldflags) $(cat $NIX_CC_CROSS/nix-support/libc-ldflags-before)"
|
extraLDFlags="$(cat $NIX_CC_CROSS/nix-support/libc-ldflags) $(cat $NIX_CC_CROSS/nix-support/libc-ldflags-before)"
|
||||||
|
|
||||||
# The path to the Glibc binaries such as `crti.o'.
|
|
||||||
glibc_dir="$(cat $NIX_CC_CROSS/nix-support/orig-libc)"
|
|
||||||
glibc_libdir="$glibc_dir/lib"
|
|
||||||
glibc_devdir="$(cat $NIX_CC_CROSS/nix-support/orig-libc-dev)"
|
|
||||||
configureFlags="$configureFlags --with-native-system-header-dir=$glibc_devdir/include"
|
|
||||||
|
|
||||||
# Use *real* header files, otherwise a limits.h is generated
|
# Use *real* header files, otherwise a limits.h is generated
|
||||||
# that does not include Glibc's limits.h (notably missing
|
# that does not include Glibc's limits.h (notably missing
|
||||||
# SSIZE_MAX, which breaks the build).
|
# SSIZE_MAX, which breaks the build).
|
||||||
NIX_FIXINC_DUMMY_CROSS="$glibc_devdir/include"
|
NIX_FIXINC_DUMMY_CROSS=$(cat $NIX_CC_CROSS/nix-support/orig-libc)/include
|
||||||
|
|
||||||
|
# The path to the Glibc binaries such as `crti.o'.
|
||||||
|
glibc_dir="$(cat $NIX_CC_CROSS/nix-support/orig-libc)"
|
||||||
|
glibc_libdir="$glibc_dir/lib"
|
||||||
|
configureFlags="$configureFlags --with-native-system-header-dir=$glibc_dir/include"
|
||||||
|
|
||||||
extraFlags="-I$NIX_FIXINC_DUMMY_CROSS $extraFlags"
|
extraFlags="-I$NIX_FIXINC_DUMMY_CROSS $extraFlags"
|
||||||
extraLDFlags="-L$glibc_libdir -rpath $glibc_libdir $extraLDFlags"
|
extraLDFlags="-L$glibc_libdir -rpath $glibc_libdir $extraLDFlags"
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
# Passed by version specific builders
|
# Passed by version specific builders
|
||||||
, baseVersion, revision, sha256
|
, baseVersion, revision, sha256
|
||||||
, extraConfigureFlags ? ""
|
, extraConfigureFlags ? ""
|
||||||
, postPatch ? null
|
|
||||||
, ...
|
, ...
|
||||||
}:
|
}:
|
||||||
|
|
||||||
|
@ -18,7 +17,6 @@ stdenv.mkDerivation rec {
|
||||||
];
|
];
|
||||||
inherit sha256;
|
inherit sha256;
|
||||||
};
|
};
|
||||||
inherit postPatch;
|
|
||||||
|
|
||||||
buildInputs = [ python bzip2 zlib gmp openssl boost ];
|
buildInputs = [ python bzip2 zlib gmp openssl boost ];
|
||||||
|
|
||||||
|
|
|
@ -5,5 +5,4 @@ callPackage ./generic.nix (args // {
|
||||||
revision = "29";
|
revision = "29";
|
||||||
sha256 = "157bp8716h17agrxyj7xpsj2i5sqhafj1nfx4gpzccx7y2kyq176";
|
sha256 = "157bp8716h17agrxyj7xpsj2i5sqhafj1nfx4gpzccx7y2kyq176";
|
||||||
openssl = null;
|
openssl = null;
|
||||||
postPatch = "sed '1i#include <cmath>' -i src/tests/test_bigint.cpp";
|
|
||||||
})
|
})
|
||||||
|
|
|
@ -50,7 +50,7 @@ stdenv.mkDerivation rec {
|
||||||
sed -i -e "s/\(am_libgettextlib_la_OBJECTS = \)error.lo/\\1/" gettext-tools/gnulib-lib/Makefile.in
|
sed -i -e "s/\(am_libgettextlib_la_OBJECTS = \)error.lo/\\1/" gettext-tools/gnulib-lib/Makefile.in
|
||||||
'';
|
'';
|
||||||
|
|
||||||
nativeBuildInputs = [ xz xz.bin ] ++ stdenv.lib.optional (!stdenv.isLinux) libiconv; # HACK, see #10874 (and 14664)
|
buildInputs = [ xz xz.bin libiconv ];
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
|
|
58
pkgs/development/libraries/glibc/builder.sh
Normal file
58
pkgs/development/libraries/glibc/builder.sh
Normal file
|
@ -0,0 +1,58 @@
|
||||||
|
# Glibc cannot have itself in its RPATH.
|
||||||
|
export NIX_NO_SELF_RPATH=1
|
||||||
|
|
||||||
|
source $stdenv/setup
|
||||||
|
|
||||||
|
postConfigure() {
|
||||||
|
# Hack: get rid of the `-static' flag set by the bootstrap stdenv.
|
||||||
|
# This has to be done *after* `configure' because it builds some
|
||||||
|
# test binaries.
|
||||||
|
export NIX_CFLAGS_LINK=
|
||||||
|
export NIX_LDFLAGS_BEFORE=
|
||||||
|
|
||||||
|
export NIX_DONT_SET_RPATH=1
|
||||||
|
unset CFLAGS
|
||||||
|
|
||||||
|
# Apparently --bindir is not respected.
|
||||||
|
makeFlagsArray+=("bindir=$bin/bin" "sbindir=$bin/sbin" "rootsbindir=$bin/sbin")
|
||||||
|
}
|
||||||
|
|
||||||
|
postInstall() {
|
||||||
|
if test -n "$installLocales"; then
|
||||||
|
make -j${NIX_BUILD_CORES:-1} -l${NIX_BUILD_CORES:-1} localedata/install-locales
|
||||||
|
fi
|
||||||
|
|
||||||
|
test -f $out/etc/ld.so.cache && rm $out/etc/ld.so.cache
|
||||||
|
|
||||||
|
if test -n "$linuxHeaders"; then
|
||||||
|
# Include the Linux kernel headers in Glibc, except the `scsi'
|
||||||
|
# subdirectory, which Glibc provides itself.
|
||||||
|
(cd $dev/include && \
|
||||||
|
ln -sv $(ls -d $linuxHeaders/include/* | grep -v 'scsi$') .)
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Fix for NIXOS-54 (ldd not working on x86_64). Make a symlink
|
||||||
|
# "lib64" to "lib".
|
||||||
|
if test -n "$is64bit"; then
|
||||||
|
ln -s lib $out/lib64
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Get rid of more unnecessary stuff.
|
||||||
|
rm -rf $out/var $out/sbin/sln
|
||||||
|
|
||||||
|
for i in $out/lib/*.a; do
|
||||||
|
strip -S "$i"
|
||||||
|
done
|
||||||
|
# Put libraries for static linking in a separate output. Note
|
||||||
|
# that libc_nonshared.a and libpthread_nonshared.a are required
|
||||||
|
# for dynamically-linked applications.
|
||||||
|
mkdir -p $static/lib
|
||||||
|
mv $out/lib/*.a $static/lib
|
||||||
|
mv $static/lib/lib*_nonshared.a $out/lib
|
||||||
|
|
||||||
|
# Work around a Nix bug: hard links across outputs cause a build failure.
|
||||||
|
cp $bin/bin/getconf $bin/bin/getconf_
|
||||||
|
mv $bin/bin/getconf_ $bin/bin/getconf
|
||||||
|
}
|
||||||
|
|
||||||
|
genericBuild
|
|
@ -54,7 +54,6 @@ stdenv.mkDerivation ({
|
||||||
./glob-simplify-interface.patch
|
./glob-simplify-interface.patch
|
||||||
./cve-2016-1234.patch
|
./cve-2016-1234.patch
|
||||||
./cve-2016-3706.patch
|
./cve-2016-3706.patch
|
||||||
./fix_warnings.patch
|
|
||||||
];
|
];
|
||||||
|
|
||||||
postPatch =
|
postPatch =
|
||||||
|
|
|
@ -17,21 +17,7 @@ in
|
||||||
inherit lib stdenv fetchurl linuxHeaders installLocales
|
inherit lib stdenv fetchurl linuxHeaders installLocales
|
||||||
profilingLibraries gccCross withGd gd libpng;
|
profilingLibraries gccCross withGd gd libpng;
|
||||||
|
|
||||||
NIX_NO_SELF_RPATH = true;
|
builder = ./builder.sh;
|
||||||
|
|
||||||
postConfigure = ''
|
|
||||||
# Hack: get rid of the `-static' flag set by the bootstrap stdenv.
|
|
||||||
# This has to be done *after* `configure' because it builds some
|
|
||||||
# test binaries.
|
|
||||||
export NIX_CFLAGS_LINK=
|
|
||||||
export NIX_LDFLAGS_BEFORE=
|
|
||||||
|
|
||||||
export NIX_DONT_SET_RPATH=1
|
|
||||||
unset CFLAGS
|
|
||||||
|
|
||||||
# Apparently --bindir is not respected.
|
|
||||||
makeFlagsArray+=("bindir=$bin/bin" "sbindir=$bin/sbin" "rootsbindir=$bin/sbin")
|
|
||||||
'';
|
|
||||||
|
|
||||||
# When building glibc from bootstrap-tools, we need libgcc_s at RPATH for
|
# When building glibc from bootstrap-tools, we need libgcc_s at RPATH for
|
||||||
# any program we run, because the gcc will have been placed at a new
|
# any program we run, because the gcc will have been placed at a new
|
||||||
|
@ -40,7 +26,7 @@ in
|
||||||
# Building from a proper gcc staying in the path where it was installed,
|
# Building from a proper gcc staying in the path where it was installed,
|
||||||
# libgcc_s will not be at {gcc}/lib, and gcc's libgcc will be found without
|
# libgcc_s will not be at {gcc}/lib, and gcc's libgcc will be found without
|
||||||
# any special hack.
|
# any special hack.
|
||||||
preInstall = ''
|
preInstall = if cross != null then "" else ''
|
||||||
if [ -f ${stdenv.cc.cc}/lib/libgcc_s.so.1 ]; then
|
if [ -f ${stdenv.cc.cc}/lib/libgcc_s.so.1 ]; then
|
||||||
mkdir -p $out/lib
|
mkdir -p $out/lib
|
||||||
cp ${stdenv.cc.cc}/lib/libgcc_s.so.1 $out/lib/libgcc_s.so.1
|
cp ${stdenv.cc.cc}/lib/libgcc_s.so.1 $out/lib/libgcc_s.so.1
|
||||||
|
@ -49,41 +35,6 @@ in
|
||||||
fi
|
fi
|
||||||
'';
|
'';
|
||||||
|
|
||||||
postInstall = ''
|
|
||||||
if test -n "$installLocales"; then
|
|
||||||
make -j''${NIX_BUILD_CORES:-1} -l''${NIX_BUILD_CORES:-1} localedata/install-locales
|
|
||||||
fi
|
|
||||||
|
|
||||||
test -f $out/etc/ld.so.cache && rm $out/etc/ld.so.cache
|
|
||||||
|
|
||||||
if test -n "$linuxHeaders"; then
|
|
||||||
# Include the Linux kernel headers in Glibc, except the `scsi'
|
|
||||||
# subdirectory, which Glibc provides itself.
|
|
||||||
(cd $dev/include && \
|
|
||||||
ln -sv $(ls -d $linuxHeaders/include/* | grep -v scsi\$) .)
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Fix for NIXOS-54 (ldd not working on x86_64). Make a symlink
|
|
||||||
# "lib64" to "lib".
|
|
||||||
if test -n "$is64bit"; then
|
|
||||||
ln -s lib $out/lib64
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Get rid of more unnecessary stuff.
|
|
||||||
rm -rf $out/var $out/sbin/sln
|
|
||||||
|
|
||||||
# Put libraries for static linking in a separate output. Note
|
|
||||||
# that libc_nonshared.a and libpthread_nonshared.a are required
|
|
||||||
# for dynamically-linked applications.
|
|
||||||
mkdir -p $static/lib
|
|
||||||
mv $out/lib/*.a $static/lib
|
|
||||||
mv $static/lib/lib*_nonshared.a $out/lib
|
|
||||||
|
|
||||||
# Work around a Nix bug: hard links across outputs cause a build failure.
|
|
||||||
cp $bin/bin/getconf $bin/bin/getconf_
|
|
||||||
mv $bin/bin/getconf_ $bin/bin/getconf
|
|
||||||
'';
|
|
||||||
|
|
||||||
separateDebugInfo = true;
|
separateDebugInfo = true;
|
||||||
|
|
||||||
meta.description = "The GNU C Library";
|
meta.description = "The GNU C Library";
|
||||||
|
@ -111,10 +62,6 @@ in
|
||||||
dontStrip=1
|
dontStrip=1
|
||||||
'';
|
'';
|
||||||
|
|
||||||
preInstall = null; # clobber the native hook
|
|
||||||
|
|
||||||
separateDebugInfo = false; # this is currently broken for crossDrv
|
|
||||||
|
|
||||||
# To avoid a dependency on the build system 'bash'.
|
# To avoid a dependency on the build system 'bash'.
|
||||||
preFixup = ''
|
preFixup = ''
|
||||||
rm $bin/bin/{ldd,tzselect,catchsegv,xtrace}
|
rm $bin/bin/{ldd,tzselect,catchsegv,xtrace}
|
||||||
|
|
|
@ -1,36 +0,0 @@
|
||||||
--- a/stdlib/setenv.c 2016-05-30 11:09:14.487180254 +0000
|
|
||||||
+++ b/stdlib/setenv.c 2016-05-30 11:08:25.560390748 +0000
|
|
||||||
@@ -277,6 +277,7 @@
|
|
||||||
|
|
||||||
ep = __environ;
|
|
||||||
if (ep != NULL)
|
|
||||||
+ {
|
|
||||||
while (*ep != NULL)
|
|
||||||
if (!strncmp (*ep, name, len) && (*ep)[len] == '=')
|
|
||||||
{
|
|
||||||
@@ -290,6 +291,7 @@
|
|
||||||
}
|
|
||||||
else
|
|
||||||
++ep;
|
|
||||||
+ }
|
|
||||||
|
|
||||||
UNLOCK;
|
|
||||||
|
|
||||||
--- a/nis/nis_call.c 2016-05-30 08:05:59.359855696 -0700
|
|
||||||
+++ b/nis/nis_call.c 2016-05-30 08:05:55.679873221 -0700
|
|
||||||
@@ -680,6 +680,7 @@
|
|
||||||
/* Choose which entry should be evicted from the cache. */
|
|
||||||
loc = &nis_server_cache[0];
|
|
||||||
if (*loc != NULL)
|
|
||||||
+ {
|
|
||||||
for (i = 1; i < 16; ++i)
|
|
||||||
if (nis_server_cache[i] == NULL)
|
|
||||||
{
|
|
||||||
@@ -690,6 +691,7 @@
|
|
||||||
|| ((*loc)->uses == nis_server_cache[i]->uses
|
|
||||||
&& (*loc)->expires > nis_server_cache[i]->expires))
|
|
||||||
loc = &nis_server_cache[i];
|
|
||||||
+ }
|
|
||||||
old = *loc;
|
|
||||||
*loc = new;
|
|
||||||
|
|
|
@ -26,8 +26,6 @@ stdenv.mkDerivation rec {
|
||||||
buildInputs = [ openssl ]
|
buildInputs = [ openssl ]
|
||||||
++ optionals (!libOnly) [ openldap libedit ];
|
++ optionals (!libOnly) [ openldap libedit ];
|
||||||
|
|
||||||
patches = [ ./path_char_fix.patch ];
|
|
||||||
|
|
||||||
preConfigure = "cd ./src";
|
preConfigure = "cd ./src";
|
||||||
|
|
||||||
buildPhase = optionalString libOnly ''
|
buildPhase = optionalString libOnly ''
|
||||||
|
|
|
@ -1,38 +0,0 @@
|
||||||
See https://github.com/krb5/krb5/pull/467
|
|
||||||
diff --git a/src/include/Makefile.in b/src/include/Makefile.in
|
|
||||||
index 4bb11e4..cb4b44b 100644
|
|
||||||
--- a/src/include/Makefile.in
|
|
||||||
+++ b/src/include/Makefile.in
|
|
||||||
@@ -57,19 +57,19 @@ SBINDIR = @sbindir@
|
|
||||||
LIBDIR = @libdir@
|
|
||||||
SYSCONFCONF = @SYSCONFCONF@
|
|
||||||
|
|
||||||
-PROCESS_REPLACE = -e "s+@KRB5RCTMPDIR+$(KRB5RCTMPDIR)+" \
|
|
||||||
- -e "s+@PREFIX+$(INSTALL_PREFIX)+" \
|
|
||||||
- -e "s+@EXEC_PREFIX+$(INSTALL_EXEC_PREFIX)+" \
|
|
||||||
- -e "s+@BINDIR+$(BINDIR)+" \
|
|
||||||
- -e "s+@LIBDIR+$(LIBDIR)+" \
|
|
||||||
- -e "s+@SBINDIR+$(SBINDIR)+" \
|
|
||||||
- -e "s+@MODULEDIR+$(MODULE_DIR)+" \
|
|
||||||
- -e "s+@GSSMODULEDIR+$(GSS_MODULE_DIR)+" \
|
|
||||||
- -e 's+@LOCALSTATEDIR+$(LOCALSTATEDIR)+' \
|
|
||||||
- -e 's+@RUNSTATEDIR+$(RUNSTATEDIR)+' \
|
|
||||||
- -e 's+@SYSCONFDIR+$(SYSCONFDIR)+' \
|
|
||||||
- -e 's+@DYNOBJEXT+$(DYNOBJEXT)+' \
|
|
||||||
- -e 's+@SYSCONFCONF+$(SYSCONFCONF)+'
|
|
||||||
+PROCESS_REPLACE = -e "s\"@KRB5RCTMPDIR\"$(KRB5RCTMPDIR)\"" \
|
|
||||||
+ -e "s\"@PREFIX\"$(INSTALL_PREFIX)\"" \
|
|
||||||
+ -e "s\"@EXEC_PREFIX\"$(INSTALL_EXEC_PREFIX)\"" \
|
|
||||||
+ -e "s\"@BINDIR\"$(BINDIR)\"" \
|
|
||||||
+ -e "s\"@LIBDIR\"$(LIBDIR)\"" \
|
|
||||||
+ -e "s\"@SBINDIR\"$(SBINDIR)\"" \
|
|
||||||
+ -e "s\"@MODULEDIR\"$(MODULE_DIR)\"" \
|
|
||||||
+ -e "s\"@GSSMODULEDIR\"$(GSS_MODULE_DIR)\"" \
|
|
||||||
+ -e "s\"@LOCALSTATEDIR\"$(LOCALSTATEDIR)\"" \
|
|
||||||
+ -e "s\"@RUNSTATEDIR\"$(RUNSTATEDIR)\"" \
|
|
||||||
+ -e "s\"@SYSCONFDIR\"$(SYSCONFDIR)\"" \
|
|
||||||
+ -e "s\"@DYNOBJEXT\"$(DYNOBJEXT)\"" \
|
|
||||||
+ -e "s\"@SYSCONFCONF\"$(SYSCONFCONF)\""
|
|
||||||
|
|
||||||
OSCONFSRC = $(srcdir)/osconf.hin
|
|
||||||
|
|
|
@ -9,10 +9,10 @@ stdenv.mkDerivation rec {
|
||||||
};
|
};
|
||||||
|
|
||||||
doCheck = true;
|
doCheck = true;
|
||||||
|
|
||||||
# For cross-compiling, native glibc is needed for the "gencat" program.
|
# For cross-compiling, native glibc is needed for the "gencat" program.
|
||||||
crossAttrs = {
|
crossAttrs = {
|
||||||
nativeBuildInputs = [ gettext glibc ];
|
nativeBuildInputs = [ glibc ];
|
||||||
};
|
};
|
||||||
|
|
||||||
# Libelf's custom NLS macros fail to determine the catalog file extension on
|
# Libelf's custom NLS macros fail to determine the catalog file extension on
|
||||||
|
@ -20,7 +20,7 @@ stdenv.mkDerivation rec {
|
||||||
# FIXME: Eventually make Gettext a build input on all platforms.
|
# FIXME: Eventually make Gettext a build input on all platforms.
|
||||||
configureFlags = stdenv.lib.optional stdenv.isDarwin "--disable-nls";
|
configureFlags = stdenv.lib.optional stdenv.isDarwin "--disable-nls";
|
||||||
|
|
||||||
nativeBuildInputs = [ gettext ];
|
buildInputs = [ gettext ];
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
description = "ELF object file access library";
|
description = "ELF object file access library";
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{ stdenv, fetchurl, pkgconfig, yacc, flex, xkeyboard_config, libxcb, libX11 }:
|
{ stdenv, fetchurl, pkgconfig, yacc, flex, xkeyboard_config, libxcb }:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "libxkbcommon-0.6.1";
|
name = "libxkbcommon-0.6.1";
|
||||||
|
@ -12,10 +12,9 @@ stdenv.mkDerivation rec {
|
||||||
|
|
||||||
buildInputs = [ pkgconfig yacc flex xkeyboard_config libxcb ];
|
buildInputs = [ pkgconfig yacc flex xkeyboard_config libxcb ];
|
||||||
|
|
||||||
configureFlags = [
|
configureFlags = ''
|
||||||
"--with-xkb-config-root=${xkeyboard_config}/etc/X11/xkb"
|
--with-xkb-config-root=${xkeyboard_config}/etc/X11/xkb
|
||||||
"--with-x-locale-root=${libX11.out}/share/X11/locale"
|
'';
|
||||||
];
|
|
||||||
|
|
||||||
preBuild = stdenv.lib.optionalString stdenv.isDarwin ''
|
preBuild = stdenv.lib.optionalString stdenv.isDarwin ''
|
||||||
sed -i 's/,--version-script=.*$//' Makefile
|
sed -i 's/,--version-script=.*$//' Makefile
|
||||||
|
|
|
@ -11,8 +11,6 @@ stdenv.mkDerivation rec {
|
||||||
sha256 = "1d7lnbwxwakclqqfjwyk9w3wd2clkihdr6ljs5z08ydiaspri093";
|
sha256 = "1d7lnbwxwakclqqfjwyk9w3wd2clkihdr6ljs5z08ydiaspri093";
|
||||||
};
|
};
|
||||||
|
|
||||||
postPatch = "sed '1i#include <cmath>' -i src/tree/param.h";
|
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
|
|
|
@ -46,15 +46,16 @@ wrapPythonProgramsIn() {
|
||||||
# wrapProgram creates the executable shell script described
|
# wrapProgram creates the executable shell script described
|
||||||
# above. The script will set PYTHONPATH and PATH variables.!
|
# above. The script will set PYTHONPATH and PATH variables.!
|
||||||
# (see pkgs/build-support/setup-hooks/make-wrapper.sh)
|
# (see pkgs/build-support/setup-hooks/make-wrapper.sh)
|
||||||
local -a wrap_args=("$f"
|
local wrap_args="$f \
|
||||||
--prefix PYTHONPATH ':' "$program_PYTHONPATH"
|
--prefix PYTHONPATH ':' $program_PYTHONPATH \
|
||||||
--prefix PATH ':' "$program_PATH:$dir/bin")
|
--prefix PATH ':' $program_PATH:$dir/bin"
|
||||||
|
|
||||||
# Add any additional arguments provided by makeWrapperArgs
|
# Add any additional arguments provided by makeWrapperArgs
|
||||||
# argument to buildPythonPackage.
|
# argument to buildPythonPackage.
|
||||||
local -a user_args="($makeWrapperArgs)"
|
for arg in $makeWrapperArgs; do
|
||||||
local -a wrapProgramArgs=("${wrap_args[@]}" "${user_args[@]}")
|
wrap_args="$wrap_args $arg"
|
||||||
wrapProgram "${wrapProgramArgs[@]}"
|
done
|
||||||
|
wrapProgram $wrap_args
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
|
@ -11,9 +11,8 @@ stdenv.mkDerivation rec {
|
||||||
sha256 = "03fl2wgbc1cilaw8hrhfqjsbpi05cid6k4cr3s2vmv5gx0dnrgy4";
|
sha256 = "03fl2wgbc1cilaw8hrhfqjsbpi05cid6k4cr3s2vmv5gx0dnrgy4";
|
||||||
};
|
};
|
||||||
|
|
||||||
postPatch = ''
|
patchPhase = ''
|
||||||
substituteInPlace src/Command.cc --replace '_BSD_SOURCE' '_DEFAULT_SOURCE'
|
substituteInPlace src/Command.cc --replace '_BSD_SOURCE' '_DEFAULT_SOURCE'
|
||||||
sed '7i#include <math.h>' -i src/Scheduler.cc
|
|
||||||
patchShebangs .
|
patchShebangs .
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
, gitAndTools, mercurial, darcs, subversion, bazaar, openssl, bzip2, libxslt
|
, gitAndTools, mercurial, darcs, subversion, bazaar, openssl, bzip2, libxslt
|
||||||
, guile, perl, postgresql92, aws-sdk-cpp, nukeReferences, git, boehmgc
|
, guile, perl, postgresql92, aws-sdk-cpp, nukeReferences, git, boehmgc
|
||||||
, docbook_xsl, openssh, gnused, coreutils, findutils, gzip, lzma, gnutar
|
, docbook_xsl, openssh, gnused, coreutils, findutils, gzip, lzma, gnutar
|
||||||
, rpm, dpkg, cdrkit, fetchpatch }:
|
, rpm, dpkg, cdrkit }:
|
||||||
|
|
||||||
with stdenv;
|
with stdenv;
|
||||||
|
|
||||||
|
@ -70,12 +70,6 @@ in releaseTools.nixBuild rec {
|
||||||
sha256 = "0ngipzm2i2vz5ygfd70hh82d027snpl85r8ncn1rxlkak0g8fxsl";
|
sha256 = "0ngipzm2i2vz5ygfd70hh82d027snpl85r8ncn1rxlkak0g8fxsl";
|
||||||
};
|
};
|
||||||
|
|
||||||
patches = [(fetchpatch {
|
|
||||||
name = "cmath.diff";
|
|
||||||
url = https://github.com/vcunat/hydra/commit/3c6fca1ba299.diff; # https://github.com/NixOS/hydra/pull/337
|
|
||||||
sha256 = "02m9q304ay45s7xfkm2y7lppakrkx3hrq39mm6348isnbqmbarc0";
|
|
||||||
})];
|
|
||||||
|
|
||||||
buildInputs =
|
buildInputs =
|
||||||
[ makeWrapper autoconf automake libtool unzip nukeReferences pkgconfig sqlite libpqxx
|
[ makeWrapper autoconf automake libtool unzip nukeReferences pkgconfig sqlite libpqxx
|
||||||
gitAndTools.topGit mercurial darcs subversion bazaar openssl bzip2 libxslt
|
gitAndTools.topGit mercurial darcs subversion bazaar openssl bzip2 libxslt
|
||||||
|
|
|
@ -21,9 +21,6 @@ stdenv.mkDerivation rec {
|
||||||
sed -i Makefile \
|
sed -i Makefile \
|
||||||
-e 's,-Werror,,g' \
|
-e 's,-Werror,,g' \
|
||||||
-e 's,\(DATA_PREFIX=$(PREFIX)/share/\)cataclysm-dda/,\1,g'
|
-e 's,\(DATA_PREFIX=$(PREFIX)/share/\)cataclysm-dda/,\1,g'
|
||||||
|
|
||||||
sed '1i#include <cmath>' \
|
|
||||||
-i src/{crafting,skill,weather_data,melee,vehicle,overmap,iuse_actor}.cpp
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
makeFlags = "PREFIX=$(out) LUA=1 TILES=1 SOUND=1 RELEASE=1 USE_HOME_DIR=1";
|
makeFlags = "PREFIX=$(out) LUA=1 TILES=1 SOUND=1 RELEASE=1 USE_HOME_DIR=1";
|
||||||
|
|
|
@ -39,7 +39,6 @@ in stdenv.mkDerivation rec {
|
||||||
};
|
};
|
||||||
|
|
||||||
patches = [ ./use-system-libraries.patch ];
|
patches = [ ./use-system-libraries.patch ];
|
||||||
postPatch = "sed '1i#include <math.h>' -i plugins/3dveins.cpp";
|
|
||||||
|
|
||||||
nativeBuildInputs = [ cmake perl XMLLibXML XMLLibXSLT fakegit ];
|
nativeBuildInputs = [ cmake perl XMLLibXML XMLLibXSLT fakegit ];
|
||||||
# we can't use native Lua; upstream uses private headers
|
# we can't use native Lua; upstream uses private headers
|
||||||
|
|
|
@ -13,8 +13,6 @@ stdenv.mkDerivation {
|
||||||
sha256 = "12bqh3k4wsk1c0bz2zly8h0ilbsdmsbwr9cdjc6i7liwg9906g7i";
|
sha256 = "12bqh3k4wsk1c0bz2zly8h0ilbsdmsbwr9cdjc6i7liwg9906g7i";
|
||||||
};
|
};
|
||||||
|
|
||||||
postPatch = "sed '1i#include <math.h>' -i g_src/ttf_manager.cpp";
|
|
||||||
|
|
||||||
cmakeFlags = [
|
cmakeFlags = [
|
||||||
"-DGTK2_GLIBCONFIG_INCLUDE_DIR=${glib.out}/lib/glib-2.0/include"
|
"-DGTK2_GLIBCONFIG_INCLUDE_DIR=${glib.out}/lib/glib-2.0/include"
|
||||||
"-DGTK2_GDKCONFIG_INCLUDE_DIR=${gtk2.out}/lib/gtk-2.0/include"
|
"-DGTK2_GDKCONFIG_INCLUDE_DIR=${gtk2.out}/lib/gtk-2.0/include"
|
||||||
|
|
|
@ -16,11 +16,7 @@ stdenv.mkDerivation rec {
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
substituteInPlace Sources/Client/Client_Input.cpp --replace "isnan(" "std::isnan("
|
substituteInPlace Sources/Client/Client_Input.cpp --replace "isnan(" "std::isnan("
|
||||||
substituteInPlace Sources/Client/Corpse.cpp --replace "isnan(" "std::isnan("
|
substituteInPlace Sources/Client/Corpse.cpp --replace "isnan(" "std::isnan("
|
||||||
substituteInPlace Sources/Draw/SWMapRenderer.cpp \
|
substituteInPlace Sources/Draw/SWMapRenderer.cpp --replace "isnan(" "std::isnan(" --replace "isinf(" "std::isinf("
|
||||||
--replace "isnan(" "std::isnan(" --replace "isinf(" "std::isinf("
|
|
||||||
sed '1i#include <cmath>' -i Sources/Client/{Player,Client_Input,Corpse}.cpp \
|
|
||||||
-i Sources/Draw/SWMapRenderer.cpp
|
|
||||||
sed '1i#include <math.h>' -i Sources/Draw/SWFeatureLevel.h
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
nativeBuildInputs =
|
nativeBuildInputs =
|
||||||
|
|
|
@ -14,8 +14,6 @@ stdenv.mkDerivation rec {
|
||||||
sha256 = "0vyvmgim03q8pcmfa1i0njr4w1lpjq5g3b47f67v9b5c5jcjycwn";
|
sha256 = "0vyvmgim03q8pcmfa1i0njr4w1lpjq5g3b47f67v9b5c5jcjycwn";
|
||||||
};
|
};
|
||||||
|
|
||||||
postPatch = "sed '1i#include <cmath>' -i Sources/Client/{,Client}Player.cpp";
|
|
||||||
|
|
||||||
nativeBuildInputs =
|
nativeBuildInputs =
|
||||||
with stdenv.lib;
|
with stdenv.lib;
|
||||||
[ cmake curl glew makeWrapper mesa SDL2 SDL2_image unzip wget zlib ]
|
[ cmake curl glew makeWrapper mesa SDL2 SDL2_image unzip wget zlib ]
|
||||||
|
|
|
@ -10,13 +10,10 @@ stdenv.mkDerivation rec {
|
||||||
sha256 = "1ag2cp346f9bz9qy6za6q54id44d2ypvkyhvnjha14qzzapwaysj";
|
sha256 = "1ag2cp346f9bz9qy6za6q54id44d2ypvkyhvnjha14qzzapwaysj";
|
||||||
};
|
};
|
||||||
|
|
||||||
postPatch = "sed '1i#include <vector>' -i src/model/World.h";
|
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
qt5.qtbase qt5.qtsvg qt5.qttranslations box2d which cmake
|
qt5.qtbase qt5.qtsvg qt5.qttranslations box2d which cmake
|
||||||
gettext
|
gettext
|
||||||
];
|
];
|
||||||
enableParallelBuilding = true;
|
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
make DESTDIR=.. install
|
make DESTDIR=.. install
|
||||||
|
|
|
@ -21,7 +21,6 @@ stdenv.mkDerivation rec {
|
||||||
};
|
};
|
||||||
|
|
||||||
patches = [ ./0001-change-flags.diff ];
|
patches = [ ./0001-change-flags.diff ];
|
||||||
postPatch = "sed '1i#include <cmath>' -i higan/fc/ppu/ppu.cpp";
|
|
||||||
|
|
||||||
buildInputs =
|
buildInputs =
|
||||||
[ p7zip pkgconfig libX11 libXv udev mesa SDL libao openal libpulseaudio gtk gtksourceview ];
|
[ p7zip pkgconfig libX11 libXv udev mesa SDL libao openal libpulseaudio gtk gtksourceview ];
|
||||||
|
|
|
@ -15,8 +15,6 @@ stdenv.mkDerivation rec {
|
||||||
sha256 = "0s7mxq2cgzwjfsq0vhpz6ljk7wr725nxg48128iyirf85585l691";
|
sha256 = "0s7mxq2cgzwjfsq0vhpz6ljk7wr725nxg48128iyirf85585l691";
|
||||||
};
|
};
|
||||||
|
|
||||||
postPatch = "sed '1i#include \"x86intrin.h\"' -i common/src/x86emitter/cpudetect.cpp";
|
|
||||||
|
|
||||||
configurePhase = ''
|
configurePhase = ''
|
||||||
mkdir -p build
|
mkdir -p build
|
||||||
cd build
|
cd build
|
||||||
|
@ -52,8 +50,6 @@ stdenv.mkDerivation rec {
|
||||||
soundtouch wxGTK30 zlib
|
soundtouch wxGTK30 zlib
|
||||||
];
|
];
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
description = "Playstation 2 emulator";
|
description = "Playstation 2 emulator";
|
||||||
longDescription= ''
|
longDescription= ''
|
||||||
|
|
|
@ -18,9 +18,6 @@ stdenv.mkDerivation {
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
inherit (s) url sha256;
|
inherit (s) url sha256;
|
||||||
};
|
};
|
||||||
postPatch = ''
|
|
||||||
sed '1i#include <cmath>' -i userspace/libsinsp/{cursesspectro,filterchecks}.cpp
|
|
||||||
'';
|
|
||||||
|
|
||||||
cmakeFlags = [
|
cmakeFlags = [
|
||||||
"-DUSE_BUNDLED_DEPS=OFF"
|
"-DUSE_BUNDLED_DEPS=OFF"
|
||||||
|
|
|
@ -11,13 +11,6 @@ stdenv.mkDerivation rec {
|
||||||
sha256 = "1v07fghf2jd2mvkfqhag0xblf6sxw7kx9kmhs2xpyrpns58lirvc";
|
sha256 = "1v07fghf2jd2mvkfqhag0xblf6sxw7kx9kmhs2xpyrpns58lirvc";
|
||||||
};
|
};
|
||||||
|
|
||||||
postPatch = ''
|
|
||||||
substituteInPlace 3rdParty/V8-3.31.74.1/build/gyp/gyp --replace /bin/bash ${bash}/bin/bash
|
|
||||||
substituteInPlace 3rdParty/etcd/build --replace /bin/bash ${bash}/bin/bash
|
|
||||||
sed '1i#include <cmath>' -i arangod/Aql/Functions.cpp \
|
|
||||||
-i lib/Basics/string-buffer.cpp
|
|
||||||
'';
|
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
openssl zlib python gyp go readline
|
openssl zlib python gyp go readline
|
||||||
];
|
];
|
||||||
|
@ -26,6 +19,12 @@ stdenv.mkDerivation rec {
|
||||||
|
|
||||||
NIX_CFLAGS_COMPILE = "-Wno-error=strict-overflow";
|
NIX_CFLAGS_COMPILE = "-Wno-error=strict-overflow";
|
||||||
|
|
||||||
|
|
||||||
|
patchPhase = ''
|
||||||
|
substituteInPlace 3rdParty/V8-3.31.74.1/build/gyp/gyp --replace /bin/bash ${bash}/bin/bash
|
||||||
|
substituteInPlace 3rdParty/etcd/build --replace /bin/bash ${bash}/bin/bash
|
||||||
|
'';
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
|
|
|
@ -827,10 +827,6 @@ showPhaseHeader() {
|
||||||
|
|
||||||
|
|
||||||
genericBuild() {
|
genericBuild() {
|
||||||
if [ -f "$buildCommandPath" ]; then
|
|
||||||
. "$buildCommandPath"
|
|
||||||
return
|
|
||||||
fi
|
|
||||||
if [ -n "$buildCommand" ]; then
|
if [ -n "$buildCommand" ]; then
|
||||||
eval "$buildCommand"
|
eval "$buildCommand"
|
||||||
return
|
return
|
||||||
|
|
|
@ -5,7 +5,7 @@ let buildFor = toolsArch: (
|
||||||
let
|
let
|
||||||
pkgsFun = import ../../..;
|
pkgsFun = import ../../..;
|
||||||
pkgsNoParams = pkgsFun {};
|
pkgsNoParams = pkgsFun {};
|
||||||
|
|
||||||
sheevaplugCrossSystem = {
|
sheevaplugCrossSystem = {
|
||||||
crossSystem = rec {
|
crossSystem = rec {
|
||||||
config = "armv5tel-unknown-linux-gnueabi";
|
config = "armv5tel-unknown-linux-gnueabi";
|
||||||
|
@ -18,10 +18,10 @@ let
|
||||||
openssl.system = "linux-generic32";
|
openssl.system = "linux-generic32";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
raspberrypiCrossSystem = {
|
raspberrypiCrossSystem = {
|
||||||
crossSystem = rec {
|
crossSystem = rec {
|
||||||
config = "armv6l-unknown-linux-gnueabi";
|
config = "armv6l-unknown-linux-gnueabi";
|
||||||
bigEndian = false;
|
bigEndian = false;
|
||||||
arch = "arm";
|
arch = "arm";
|
||||||
float = "hard";
|
float = "hard";
|
||||||
|
@ -33,10 +33,10 @@ let
|
||||||
inherit (platform) gcc;
|
inherit (platform) gcc;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
armv7l-hf-multiplatform-crossSystem = {
|
armv7l-hf-multiplatform-crossSystem = {
|
||||||
crossSystem = rec {
|
crossSystem = rec {
|
||||||
config = "armv7l-unknown-linux-gnueabi";
|
config = "armv7l-unknown-linux-gnueabi";
|
||||||
bigEndian = false;
|
bigEndian = false;
|
||||||
arch = "arm";
|
arch = "arm";
|
||||||
float = "hard";
|
float = "hard";
|
||||||
|
@ -48,7 +48,7 @@ let
|
||||||
inherit (platform) gcc;
|
inherit (platform) gcc;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
selectedCrossSystem =
|
selectedCrossSystem =
|
||||||
if toolsArch == "armv5tel" then sheevaplugCrossSystem else
|
if toolsArch == "armv5tel" then sheevaplugCrossSystem else
|
||||||
if toolsArch == "armv6l" then raspberrypiCrossSystem else
|
if toolsArch == "armv6l" then raspberrypiCrossSystem else
|
||||||
|
@ -91,13 +91,13 @@ rec {
|
||||||
coreutilsMinimal = (pkgs.coreutils.override (args: {
|
coreutilsMinimal = (pkgs.coreutils.override (args: {
|
||||||
aclSupport = false;
|
aclSupport = false;
|
||||||
})).crossDrv;
|
})).crossDrv;
|
||||||
|
|
||||||
curlMinimal = (pkgs.curl.override {
|
curlMinimal = (pkgs.curl.override {
|
||||||
zlibSupport = false;
|
zlibSupport = false;
|
||||||
sslSupport = false;
|
sslSupport = false;
|
||||||
scpSupport = false;
|
scpSupport = false;
|
||||||
}).crossDrv;
|
}).crossDrv;
|
||||||
|
|
||||||
busyboxMinimal = (pkgs.busybox.override {
|
busyboxMinimal = (pkgs.busybox.override {
|
||||||
# TBD: uClibc is broken.
|
# TBD: uClibc is broken.
|
||||||
# useUclibc = true;
|
# useUclibc = true;
|
||||||
|
@ -113,10 +113,10 @@ rec {
|
||||||
CONFIG_UNXZ y
|
CONFIG_UNXZ y
|
||||||
'';
|
'';
|
||||||
}).crossDrv;
|
}).crossDrv;
|
||||||
|
|
||||||
inherit pkgs;
|
inherit pkgs;
|
||||||
|
|
||||||
build =
|
build =
|
||||||
|
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation {
|
||||||
name = "build";
|
name = "build";
|
||||||
|
@ -126,7 +126,7 @@ rec {
|
||||||
crossConfig = stdenv.cross.config;
|
crossConfig = stdenv.cross.config;
|
||||||
|
|
||||||
buildCommand = ''
|
buildCommand = ''
|
||||||
set -x
|
set -x
|
||||||
mkdir -p $out/bin $out/lib $out/libexec
|
mkdir -p $out/bin $out/lib $out/libexec
|
||||||
|
|
||||||
# Copy what we need of Glibc.
|
# Copy what we need of Glibc.
|
||||||
|
@ -142,20 +142,20 @@ rec {
|
||||||
cp -d ${glibc.out}/lib/libnss*.so* $out/lib
|
cp -d ${glibc.out}/lib/libnss*.so* $out/lib
|
||||||
cp -d ${glibc.out}/lib/libresolv*.so* $out/lib
|
cp -d ${glibc.out}/lib/libresolv*.so* $out/lib
|
||||||
cp -d ${glibc.out}/lib/crt?.o $out/lib
|
cp -d ${glibc.out}/lib/crt?.o $out/lib
|
||||||
|
|
||||||
cp -rL ${glibc.dev}/include $out
|
cp -rL ${glibc.dev}/include $out
|
||||||
chmod -R u+w $out/include
|
chmod -R u+w $out/include
|
||||||
|
|
||||||
# Hopefully we won't need these.
|
# Hopefully we won't need these.
|
||||||
rm -rf $out/include/mtd $out/include/rdma $out/include/sound $out/include/video
|
rm -rf $out/include/mtd $out/include/rdma $out/include/sound $out/include/video
|
||||||
find $out/include -name .install -exec rm {} \;
|
find $out/include -name .install -exec rm {} \;
|
||||||
find $out/include -name ..install.cmd -exec rm {} \;
|
find $out/include -name ..install.cmd -exec rm {} \;
|
||||||
mv $out/include $out/include-glibc
|
mv $out/include $out/include-glibc
|
||||||
|
|
||||||
# Copy coreutils, bash, etc.
|
# Copy coreutils, bash, etc.
|
||||||
cp ${coreutilsMinimal}/bin/* $out/bin
|
cp ${coreutilsMinimal}/bin/* $out/bin
|
||||||
(cd $out/bin && rm vdir dir sha*sum pinky factor pathchk runcon shuf who whoami shred users)
|
(cd $out/bin && rm vdir dir sha*sum pinky factor pathchk runcon shuf who whoami shred users)
|
||||||
|
|
||||||
cp ${bash}/bin/bash $out/bin
|
cp ${bash}/bin/bash $out/bin
|
||||||
cp ${findutils}/bin/find $out/bin
|
cp ${findutils}/bin/find $out/bin
|
||||||
cp ${findutils}/bin/xargs $out/bin
|
cp ${findutils}/bin/xargs $out/bin
|
||||||
|
@ -174,7 +174,7 @@ rec {
|
||||||
cp -d ${curlMinimal}/lib/libcurl* $out/lib
|
cp -d ${curlMinimal}/lib/libcurl* $out/lib
|
||||||
|
|
||||||
cp -d ${gnugrep.pcre.crossDrv}/lib/libpcre*.so* $out/lib # needed by grep
|
cp -d ${gnugrep.pcre.crossDrv}/lib/libpcre*.so* $out/lib # needed by grep
|
||||||
|
|
||||||
# Copy what we need of GCC.
|
# Copy what we need of GCC.
|
||||||
cp -d ${gcc}/bin/gcc $out/bin
|
cp -d ${gcc}/bin/gcc $out/bin
|
||||||
cp -d ${gcc}/bin/cpp $out/bin
|
cp -d ${gcc}/bin/cpp $out/bin
|
||||||
|
@ -203,12 +203,12 @@ rec {
|
||||||
cp -d ${libmpc}/lib/libmpc*.so* $out/lib
|
cp -d ${libmpc}/lib/libmpc*.so* $out/lib
|
||||||
cp -d ${zlib.out}/lib/libz.so* $out/lib
|
cp -d ${zlib.out}/lib/libz.so* $out/lib
|
||||||
cp -d ${libelf}/lib/libelf.so* $out/lib
|
cp -d ${libelf}/lib/libelf.so* $out/lib
|
||||||
|
|
||||||
# TBD: Why are these needed for cross but not native tools?
|
# TBD: Why are these needed for cross but not native tools?
|
||||||
cp -d ${cloogppl}/lib/libcloog*.so* $out/lib
|
cp -d ${cloogppl}/lib/libcloog*.so* $out/lib
|
||||||
cp -d ${cloog}/lib/libcloog*.so* $out/lib
|
cp -d ${cloog}/lib/libcloog*.so* $out/lib
|
||||||
cp -d ${isl}/lib/libisl*.so* $out/lib
|
cp -d ${isl}/lib/libisl*.so* $out/lib
|
||||||
|
|
||||||
# Copy binutils.
|
# Copy binutils.
|
||||||
for i in as ld ar ranlib nm strip readelf objdump; do
|
for i in as ld ar ranlib nm strip readelf objdump; do
|
||||||
cp ${binutils}/bin/$i $out/bin
|
cp ${binutils}/bin/$i $out/bin
|
||||||
|
@ -216,7 +216,7 @@ rec {
|
||||||
cp -d ${binutils.out}/lib/lib*.so* $out/lib
|
cp -d ${binutils.out}/lib/lib*.so* $out/lib
|
||||||
|
|
||||||
chmod -R u+w $out
|
chmod -R u+w $out
|
||||||
|
|
||||||
# Strip executables even further.
|
# Strip executables even further.
|
||||||
for i in $out/bin/* $out/libexec/gcc/*/*/*; do
|
for i in $out/bin/* $out/libexec/gcc/*/*/*; do
|
||||||
if test -x $i -a ! -L $i; then
|
if test -x $i -a ! -L $i; then
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
{ fetchurl, stdenv, flex, libxml2, libxslt
|
{ fetchurl, stdenv, flex, libxml2, libxslt
|
||||||
, docbook_xml_dtd_45, docbook_xsl, w3m
|
, docbook_xml_dtd_42, docbook_xsl, w3m
|
||||||
, bash, getopt, makeWrapper }:
|
, bash, getopt, makeWrapper }:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "xmlto-0.0.28";
|
name = "xmlto-0.0.26";
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "http://fedorahosted.org/releases/x/m/xmlto/${name}.tar.bz2";
|
url = "http://fedorahosted.org/releases/x/m/xmlto/${name}.tar.bz2";
|
||||||
sha256 = "0xhj8b2pwp4vhl9y16v3dpxpsakkflfamr191mprzsspg4xdyc0i";
|
sha256 = "1v5mahfg5k9lh3anykl482xnrgxn36zlmqsgwahw29xwncprpd7g";
|
||||||
};
|
};
|
||||||
|
|
||||||
patchPhase = ''
|
patchPhase = ''
|
||||||
|
@ -20,8 +20,7 @@ stdenv.mkDerivation rec {
|
||||||
|
|
||||||
# `libxml2' provides `xmllint', needed at build-time and run-time.
|
# `libxml2' provides `xmllint', needed at build-time and run-time.
|
||||||
# `libxslt' provides `xsltproc', used by `xmlto' at run-time.
|
# `libxslt' provides `xsltproc', used by `xmlto' at run-time.
|
||||||
nativeBuildInputs = [ makeWrapper ];
|
buildInputs = [ libxml2 libxslt docbook_xml_dtd_42 docbook_xsl getopt makeWrapper ];
|
||||||
buildInputs = [ libxml2 libxslt docbook_xml_dtd_45 docbook_xsl getopt ];
|
|
||||||
|
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
wrapProgram "$out/bin/xmlto" \
|
wrapProgram "$out/bin/xmlto" \
|
||||||
|
|
Loading…
Reference in a new issue