From fb893a8ad2f02029e71c1fef51913adf2f2bc995 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Romildo=20Malaquias?= Date: Sun, 27 Mar 2016 08:29:09 -0300 Subject: [PATCH 01/28] docbook-xsl: 1.78.1 -> 1.79.1 --- pkgs/data/sgml+xml/stylesheets/xslt/docbook-xsl/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/data/sgml+xml/stylesheets/xslt/docbook-xsl/default.nix b/pkgs/data/sgml+xml/stylesheets/xslt/docbook-xsl/default.nix index 863f6044402..5d395e38365 100644 --- a/pkgs/data/sgml+xml/stylesheets/xslt/docbook-xsl/default.nix +++ b/pkgs/data/sgml+xml/stylesheets/xslt/docbook-xsl/default.nix @@ -3,7 +3,7 @@ let common = { pname, sha256 }: stdenv.mkDerivation rec { - name = "${pname}-1.78.1"; + name = "${pname}-1.79.1"; src = fetchurl { url = "mirror://sourceforge/docbook/${name}.tar.bz2"; @@ -36,12 +36,12 @@ in { docbook_xsl = common { pname = "docbook-xsl"; - sha256 = "0rxl013ncmz1n6ymk2idvx3hix9pdabk8xn01cpcv32wmfb753y9"; + sha256 = "0s59lihif2fr7rznckxr2kfyrvkirv76r1zvidp9b5mj28p4apvj"; }; docbook_xsl_ns = common { pname = "docbook-xsl-ns"; - sha256 = "1x3sc0axk9z3i6n0jhlsmzlmb723a4sjgslm9g12by6phirdx3ng"; + sha256 = "170ggf5dgjar65kkn5n33kvjr3pdinpj66nnxfx8b2avw0k91jin"; }; } From 67555277e10f403dcf41863b398f2a3b46602058 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Romildo=20Malaquias?= Date: Sun, 27 Mar 2016 12:07:45 -0300 Subject: [PATCH 02/28] xmlto: 0.0.26 -> 0.0.28 --- pkgs/tools/typesetting/xmlto/default.nix | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/pkgs/tools/typesetting/xmlto/default.nix b/pkgs/tools/typesetting/xmlto/default.nix index 49fe7dc681f..9d050558f6d 100644 --- a/pkgs/tools/typesetting/xmlto/default.nix +++ b/pkgs/tools/typesetting/xmlto/default.nix @@ -1,12 +1,12 @@ { fetchurl, stdenv, flex, libxml2, libxslt -, docbook_xml_dtd_42, docbook_xsl, w3m +, docbook_xml_dtd_45, docbook_xsl, w3m , bash, getopt, makeWrapper }: stdenv.mkDerivation rec { - name = "xmlto-0.0.26"; + name = "xmlto-0.0.28"; src = fetchurl { url = "http://fedorahosted.org/releases/x/m/xmlto/${name}.tar.bz2"; - sha256 = "1v5mahfg5k9lh3anykl482xnrgxn36zlmqsgwahw29xwncprpd7g"; + sha256 = "0xhj8b2pwp4vhl9y16v3dpxpsakkflfamr191mprzsspg4xdyc0i"; }; patchPhase = '' @@ -20,7 +20,8 @@ stdenv.mkDerivation rec { # `libxml2' provides `xmllint', needed at build-time and run-time. # `libxslt' provides `xsltproc', used by `xmlto' at run-time. - buildInputs = [ libxml2 libxslt docbook_xml_dtd_42 docbook_xsl getopt makeWrapper ]; + nativeBuildInputs = [ makeWrapper ]; + buildInputs = [ libxml2 libxslt docbook_xml_dtd_45 docbook_xsl getopt ]; postInstall = '' wrapProgram "$out/bin/xmlto" \ From 28919e5bfa23111e099f91b7edcc5828a9d451b3 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Sat, 16 Apr 2016 00:51:41 +0100 Subject: [PATCH 03/28] wrapPythonPrograms: preserve quoted strings from makeWrapperArgs Currently, if a user tries to to set a variable that contains spaces, it will be broken up before being passed to wrapProgram. This commit resolves that by converting makeWrapperArgs to an array that preserves any quoted elements using bash's parser. --- pkgs/development/python-modules/generic/wrap.sh | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/pkgs/development/python-modules/generic/wrap.sh b/pkgs/development/python-modules/generic/wrap.sh index fa6a4d0102f..5d8e2e98673 100644 --- a/pkgs/development/python-modules/generic/wrap.sh +++ b/pkgs/development/python-modules/generic/wrap.sh @@ -44,16 +44,15 @@ wrapPythonProgramsIn() { # wrapProgram creates the executable shell script described # above. The script will set PYTHONPATH and PATH variables.! # (see pkgs/build-support/setup-hooks/make-wrapper.sh) - local wrap_args="$f \ - --prefix PYTHONPATH ':' $program_PYTHONPATH \ - --prefix PATH ':' $program_PATH:$dir/bin" + local -a wrap_args=("$f" + --prefix PYTHONPATH ':' "$program_PYTHONPATH" + --prefix PATH ':' "$program_PATH:$dir/bin") # Add any additional arguments provided by makeWrapperArgs # argument to buildPythonPackage. - for arg in $makeWrapperArgs; do - wrap_args="$wrap_args $arg" - done - wrapProgram $wrap_args + local -a user_args="($makeWrapperArgs)" + local -a wrapProgramArgs=("${wrap_args[@]}" "${user_args[@]}") + wrapProgram "${wrapProgramArgs[@]}" fi fi done From d534e38d58fb8c91236db5aff6dd2a1b8566bfa2 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Sat, 16 Apr 2016 01:10:55 +0100 Subject: [PATCH 04/28] makeWrapper: allow special characters in variable contents --- pkgs/build-support/setup-hooks/make-wrapper.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/build-support/setup-hooks/make-wrapper.sh b/pkgs/build-support/setup-hooks/make-wrapper.sh index 7d0f88abb85..d3db0b64bd5 100644 --- a/pkgs/build-support/setup-hooks/make-wrapper.sh +++ b/pkgs/build-support/setup-hooks/make-wrapper.sh @@ -16,7 +16,7 @@ makeWrapper() { varName=${params[$((n + 1))]} value=${params[$((n + 2))]} n=$((n + 2)) - echo "export $varName=$value" >> $wrapper + echo "export $varName='$value'" >> $wrapper fi if test "$p" = "--unset"; then From 78f793382980e93cbeb60fec0d68da3282c8448f Mon Sep 17 00:00:00 2001 From: Eric Litak Date: Sat, 28 May 2016 09:26:23 -0700 Subject: [PATCH 05/28] infinite recursion and cross-build fix --- pkgs/development/libraries/gettext/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/libraries/gettext/default.nix b/pkgs/development/libraries/gettext/default.nix index 78a8756b59b..63eb086b0fb 100644 --- a/pkgs/development/libraries/gettext/default.nix +++ b/pkgs/development/libraries/gettext/default.nix @@ -50,7 +50,7 @@ stdenv.mkDerivation rec { sed -i -e "s/\(am_libgettextlib_la_OBJECTS = \)error.lo/\\1/" gettext-tools/gnulib-lib/Makefile.in ''; - buildInputs = [ xz xz.bin libiconv ]; + nativeBuildInputs = [ xz xz.bin ] ++ stdenv.lib.optional (!stdenv.isLinux) libiconv; # HACK, see #10874 (and 14664) enableParallelBuilding = true; From 0265285b9636c5d900aded5d17073d8538ae60ba Mon Sep 17 00:00:00 2001 From: Eric Litak Date: Sun, 29 May 2016 08:58:35 -0700 Subject: [PATCH 06/28] moving builder.sh hooks into nix --- pkgs/development/libraries/glibc/builder.sh | 58 -------------------- pkgs/development/libraries/glibc/default.nix | 54 +++++++++++++++++- 2 files changed, 53 insertions(+), 59 deletions(-) delete mode 100644 pkgs/development/libraries/glibc/builder.sh diff --git a/pkgs/development/libraries/glibc/builder.sh b/pkgs/development/libraries/glibc/builder.sh deleted file mode 100644 index 85f27c7b355..00000000000 --- a/pkgs/development/libraries/glibc/builder.sh +++ /dev/null @@ -1,58 +0,0 @@ -# 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 diff --git a/pkgs/development/libraries/glibc/default.nix b/pkgs/development/libraries/glibc/default.nix index 80fc2ce1e93..1124ff18499 100644 --- a/pkgs/development/libraries/glibc/default.nix +++ b/pkgs/development/libraries/glibc/default.nix @@ -17,7 +17,21 @@ in inherit lib stdenv fetchurl linuxHeaders installLocales profilingLibraries gccCross withGd gd libpng; - builder = ./builder.sh; + NIX_NO_SELF_RPATH = true; + + 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 # any program we run, because the gcc will have been placed at a new @@ -35,6 +49,44 @@ in 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 + + 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 + ''; + separateDebugInfo = true; meta.description = "The GNU C Library"; From 44ae9a3c0a92b68c3e4b8425784ddc8a777c866d Mon Sep 17 00:00:00 2001 From: Eric Litak Date: Sun, 29 May 2016 09:00:22 -0700 Subject: [PATCH 07/28] reorganize crossDrv hooks --- pkgs/development/libraries/glibc/default.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkgs/development/libraries/glibc/default.nix b/pkgs/development/libraries/glibc/default.nix index 1124ff18499..383b2f5cc46 100644 --- a/pkgs/development/libraries/glibc/default.nix +++ b/pkgs/development/libraries/glibc/default.nix @@ -40,7 +40,7 @@ in # 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 # any special hack. - preInstall = if cross != null then "" else '' + preInstall = '' if [ -f ${stdenv.cc.cc}/lib/libgcc_s.so.1 ]; then mkdir -p $out/lib cp ${stdenv.cc.cc}/lib/libgcc_s.so.1 $out/lib/libgcc_s.so.1 @@ -114,6 +114,10 @@ in 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'. preFixup = '' rm $bin/bin/{ldd,tzselect,catchsegv,xtrace} From e8ca9dca5302c86cb56a8bca1d3bc1a7b3435e85 Mon Sep 17 00:00:00 2001 From: Eric Litak Date: Sun, 29 May 2016 09:04:18 -0700 Subject: [PATCH 08/28] manual strip broke crossDrv. no clue why it was ever added; should be automatic --- pkgs/development/libraries/glibc/default.nix | 3 --- 1 file changed, 3 deletions(-) diff --git a/pkgs/development/libraries/glibc/default.nix b/pkgs/development/libraries/glibc/default.nix index 383b2f5cc46..0ea6b4b938b 100644 --- a/pkgs/development/libraries/glibc/default.nix +++ b/pkgs/development/libraries/glibc/default.nix @@ -72,9 +72,6 @@ in # 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. From 7399d0949c4dc2d05e2c487288914e95be8ec831 Mon Sep 17 00:00:00 2001 From: Eric Litak Date: Sun, 29 May 2016 09:27:47 -0700 Subject: [PATCH 09/28] fixing libcCross related flags (excluding darwin and mingw for now) --- .../gcc-cross-wrapper/default.nix | 3 +- pkgs/development/compilers/gcc/5/default.nix | 31 +++++++++++++------ pkgs/development/compilers/gcc/builder.sh | 4 --- 3 files changed, 24 insertions(+), 14 deletions(-) diff --git a/pkgs/build-support/gcc-cross-wrapper/default.nix b/pkgs/build-support/gcc-cross-wrapper/default.nix index d3494b83a87..fe2a530e1e8 100644 --- a/pkgs/build-support/gcc-cross-wrapper/default.nix +++ b/pkgs/build-support/gcc-cross-wrapper/default.nix @@ -44,7 +44,8 @@ stdenv.mkDerivation { ldWrapper = ./ld-wrapper.sh; utils = ./utils.sh; addFlags = ./add-flags; - inherit nativeTools nativeLibc nativePrefix gcc libc binutils; + inherit nativeTools nativeLibc nativePrefix gcc binutils; + libc = if libc ? out then libc.out else libc; crossConfig = if cross != null then cross.config else null; osxMinVersion = cross.osxMinVersion or null; gccLibs = if gcc != null then gccLibs else null; diff --git a/pkgs/development/compilers/gcc/5/default.nix b/pkgs/development/compilers/gcc/5/default.nix index 9e0220ffc72..2512e90ff03 100644 --- a/pkgs/development/compilers/gcc/5/default.nix +++ b/pkgs/development/compilers/gcc/5/default.nix @@ -256,9 +256,9 @@ stdenv.mkDerivation ({ sed -i "${gnu_h}" \ -es'|LIB_SPEC *"\(.*\)$|LIB_SPEC "${extraLibSpec} \1|g' - echo "setting \`NATIVE_SYSTEM_HEADER_DIR' and \`STANDARD_INCLUDE_DIR' to \`${libc}/include'..." + echo "setting \`NATIVE_SYSTEM_HEADER_DIR' and \`STANDARD_INCLUDE_DIR' to \`${libc.dev}/include'..." sed -i "${gnu_h}" \ - -es'|#define STANDARD_INCLUDE_DIR.*$|#define STANDARD_INCLUDE_DIR "${libc}/include"|g' + -es'|#define STANDARD_INCLUDE_DIR.*$|#define STANDARD_INCLUDE_DIR "${libc.dev}/include"|g' '' else if cross != null || stdenv.cc.libc != null then # 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 echo " fixing \`$header'..." sed -i "$header" \ - -e 's|define[[:blank:]]*\([UCG]\+\)LIBC_DYNAMIC_LINKER\([0-9]*\)[[:blank:]]"\([^\"]\+\)"$|define \1LIBC_DYNAMIC_LINKER\2 "${libc}\3"|g' + -e 's|define[[:blank:]]*\([UCG]\+\)LIBC_DYNAMIC_LINKER\([0-9]*\)[[:blank:]]"\([^\"]\+\)"$|define \1LIBC_DYNAMIC_LINKER\2 "${libc.out}\3"|g' done '' else null; @@ -482,15 +482,28 @@ stdenv.mkDerivation ({ ++ optional (libpthread != null) libpthread))); EXTRA_TARGET_CFLAGS = - if cross != null && libcCross != null - then "-idirafter ${libcCross}/include" + if cross != null && libcCross != null then [ + "-idirafter ${libcCross.dev}/include" + ] + ++ optionals (! crossStageStatic) [ + "-B${libcCross.out}/lib" + ] else null; EXTRA_TARGET_LDFLAGS = - if cross != null && libcCross != null - then "-B${libcCross}/lib -Wl,-L${libcCross}/lib" + - (optionalString (libpthreadCross != null) - " -L${libpthreadCross}/lib -Wl,${libpthreadCross.TARGET_LDFLAGS}") + if cross != null && libcCross != null then [ + "-Wl,-L${libcCross.out}/lib" + ] + ++ (if crossStageStatic then [ + "-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; passthru = diff --git a/pkgs/development/compilers/gcc/builder.sh b/pkgs/development/compilers/gcc/builder.sh index 22107e72ef7..bff96d274ac 100644 --- a/pkgs/development/compilers/gcc/builder.sh +++ b/pkgs/development/compilers/gcc/builder.sh @@ -70,10 +70,6 @@ if test "$noSysDirs" = "1"; then # gcj in. unset LIBRARY_PATH 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 if test -z "$NIX_CC_CROSS"; then EXTRA_TARGET_CFLAGS="$EXTRA_FLAGS" From 527f619aae26a50884b0246b1aa0a746de3f6322 Mon Sep 17 00:00:00 2001 From: Eric Litak Date: Mon, 30 May 2016 12:20:33 -0700 Subject: [PATCH 10/28] same changes to gcc6 --- pkgs/development/compilers/gcc/6/default.nix | 31 ++++++++++++++------ 1 file changed, 22 insertions(+), 9 deletions(-) diff --git a/pkgs/development/compilers/gcc/6/default.nix b/pkgs/development/compilers/gcc/6/default.nix index 6ca0f2f59f4..be99237bfdb 100644 --- a/pkgs/development/compilers/gcc/6/default.nix +++ b/pkgs/development/compilers/gcc/6/default.nix @@ -256,9 +256,9 @@ stdenv.mkDerivation ({ sed -i "${gnu_h}" \ -es'|LIB_SPEC *"\(.*\)$|LIB_SPEC "${extraLibSpec} \1|g' - echo "setting \`NATIVE_SYSTEM_HEADER_DIR' and \`STANDARD_INCLUDE_DIR' to \`${libc}/include'..." + echo "setting \`NATIVE_SYSTEM_HEADER_DIR' and \`STANDARD_INCLUDE_DIR' to \`${libc.dev}/include'..." sed -i "${gnu_h}" \ - -es'|#define STANDARD_INCLUDE_DIR.*$|#define STANDARD_INCLUDE_DIR "${libc}/include"|g' + -es'|#define STANDARD_INCLUDE_DIR.*$|#define STANDARD_INCLUDE_DIR "${libc.dev}/include"|g' '' else if cross != null || stdenv.cc.libc != null then # 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 echo " fixing \`$header'..." sed -i "$header" \ - -e 's|define[[:blank:]]*\([UCG]\+\)LIBC_DYNAMIC_LINKER\([0-9]*\)[[:blank:]]"\([^\"]\+\)"$|define \1LIBC_DYNAMIC_LINKER\2 "${libc}\3"|g' + -e 's|define[[:blank:]]*\([UCG]\+\)LIBC_DYNAMIC_LINKER\([0-9]*\)[[:blank:]]"\([^\"]\+\)"$|define \1LIBC_DYNAMIC_LINKER\2 "${libc.out}\3"|g' done '' else null; @@ -482,15 +482,28 @@ stdenv.mkDerivation ({ ++ optional (libpthread != null) libpthread))); EXTRA_TARGET_CFLAGS = - if cross != null && libcCross != null - then "-idirafter ${libcCross}/include" + if cross != null && libcCross != null then [ + "-idirafter ${libcCross.dev}/include" + ] + ++ optionals (! crossStageStatic) [ + "-B${libcCross.out}/lib" + ] else null; EXTRA_TARGET_LDFLAGS = - if cross != null && libcCross != null - then "-B${libcCross}/lib -Wl,-L${libcCross}/lib" + - (optionalString (libpthreadCross != null) - " -L${libpthreadCross}/lib -Wl,${libpthreadCross.TARGET_LDFLAGS}") + if cross != null && libcCross != null then [ + "-Wl,-L${libcCross.out}/lib" + ] + ++ (if crossStageStatic then [ + "-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; passthru = From 251c97adee1381b9d04872e22dc15c83959b7f88 Mon Sep 17 00:00:00 2001 From: Eric Litak Date: Mon, 30 May 2016 12:20:53 -0700 Subject: [PATCH 11/28] fix brace warnings in glibc --- pkgs/development/libraries/glibc/common.nix | 1 + .../libraries/glibc/fix_warnings.patch | 36 +++++++++++++++++++ 2 files changed, 37 insertions(+) create mode 100644 pkgs/development/libraries/glibc/fix_warnings.patch diff --git a/pkgs/development/libraries/glibc/common.nix b/pkgs/development/libraries/glibc/common.nix index a189edb9832..e90fdc4ad7b 100644 --- a/pkgs/development/libraries/glibc/common.nix +++ b/pkgs/development/libraries/glibc/common.nix @@ -54,6 +54,7 @@ stdenv.mkDerivation ({ ./glob-simplify-interface.patch ./cve-2016-1234.patch ./cve-2016-3706.patch + ./fix_warnings.patch ]; postPatch = diff --git a/pkgs/development/libraries/glibc/fix_warnings.patch b/pkgs/development/libraries/glibc/fix_warnings.patch new file mode 100644 index 00000000000..fd75c18c84e --- /dev/null +++ b/pkgs/development/libraries/glibc/fix_warnings.patch @@ -0,0 +1,36 @@ +--- 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; + From 89c9a8896b8b0793cdad1728c39e300bf10c5df7 Mon Sep 17 00:00:00 2001 From: Eric Litak Date: Tue, 31 May 2016 09:23:42 -0700 Subject: [PATCH 12/28] same changes to the rest. 4.5 has inf recursion still, 4.6 too old for glibc2.23 --- .../development/compilers/gcc/4.5/default.nix | 37 +++++++++++++------ pkgs/development/compilers/gcc/4.6/builder.sh | 4 +- .../development/compilers/gcc/4.6/default.nix | 33 ++++++++++++----- .../development/compilers/gcc/4.8/default.nix | 31 +++++++++++----- .../development/compilers/gcc/4.9/default.nix | 31 +++++++++++----- 5 files changed, 95 insertions(+), 41 deletions(-) diff --git a/pkgs/development/compilers/gcc/4.5/default.nix b/pkgs/development/compilers/gcc/4.5/default.nix index b1eedf7707d..d8848a979f4 100644 --- a/pkgs/development/compilers/gcc/4.5/default.nix +++ b/pkgs/development/compilers/gcc/4.5/default.nix @@ -179,11 +179,11 @@ stdenv.mkDerivation ({ sed -i "${gnu_h}" \ -es'|LIB_SPEC *"\(.*\)$|LIB_SPEC "${extraLibSpec} \1|g' - echo "setting \`NATIVE_SYSTEM_HEADER_DIR' and \`STANDARD_INCLUDE_DIR' to \`${libc}/include'..." + echo "setting \`NATIVE_SYSTEM_HEADER_DIR' and \`STANDARD_INCLUDE_DIR' to \`${libc.dev}/include'..." sed -i "${gnu_h}" \ - -es'|#define STANDARD_INCLUDE_DIR.*$|#define STANDARD_INCLUDE_DIR "${libc}/include"|g' + -es'|#define STANDARD_INCLUDE_DIR.*$|#define STANDARD_INCLUDE_DIR "${libc.dev}/include"|g' sed -i gcc/config/t-gnu \ - -es'|NATIVE_SYSTEM_HEADER_DIR.*$|NATIVE_SYSTEM_HEADER_DIR = ${libc}/include|g' + -es'|NATIVE_SYSTEM_HEADER_DIR.*$|NATIVE_SYSTEM_HEADER_DIR = ${libc.dev}/include|g' '' else if cross != null || stdenv.cc.libc != null then # 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 echo " fixing \`$header'..." sed -i "$header" \ - -e 's|define[[:blank:]]*\([UCG]\+\)LIBC_DYNAMIC_LINKER\([0-9]*\)[[:blank:]]"\([^\"]\+\)"$|define \1LIBC_DYNAMIC_LINKER\2 "${libc}\3"|g' + -e 's|define[[:blank:]]*\([UCG]\+\)LIBC_DYNAMIC_LINKER\([0-9]*\)[[:blank:]]"\([^\"]\+\)"$|define \1LIBC_DYNAMIC_LINKER\2 "${libc.out}\3"|g' done '' else null; @@ -205,10 +205,10 @@ stdenv.mkDerivation ({ inherit noSysDirs profiledCompiler staticCompiler langJava crossStageStatic libcCross crossMingw; - nativeBuildInputs = [ texinfo which ] + nativeBuildInputs = [ texinfo which gettext ] ++ optional (perl != null) perl; - buildInputs = [ gmp mpfr libmpc libelf gettext ] + buildInputs = [ gmp mpfr libmpc libelf ] ++ (optional (ppl != null) ppl) ++ (optional (cloogppl != null) cloogppl) ++ (optional (zlib != null) zlib) @@ -346,15 +346,28 @@ stdenv.mkDerivation ({ ++ optional (libpthread != null) libpthread))); EXTRA_TARGET_CFLAGS = - if cross != null && libcCross != null - then "-idirafter ${libcCross}/include" + if cross != null && libcCross != null then [ + "-idirafter ${libcCross.dev}/include" + ] + ++ optionals (! crossStageStatic) [ + "-B${libcCross.out}/lib" + ] else null; EXTRA_TARGET_LDFLAGS = - if cross != null && libcCross != null - then "-B${libcCross}/lib -Wl,-L${libcCross}/lib" + - (optionalString (libpthreadCross != null) - " -L${libpthreadCross}/lib -Wl,${libpthreadCross.TARGET_LDFLAGS}") + if cross != null && libcCross != null then [ + "-Wl,-L${libcCross.out}/lib" + ] + ++ (if crossStageStatic then [ + "-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; passthru = { inherit langC langCC langAda langFortran langVhdl diff --git a/pkgs/development/compilers/gcc/4.6/builder.sh b/pkgs/development/compilers/gcc/4.6/builder.sh index af36ec33b70..6087bb30cfb 100644 --- a/pkgs/development/compilers/gcc/4.6/builder.sh +++ b/pkgs/development/compilers/gcc/4.6/builder.sh @@ -209,7 +209,9 @@ postInstall() { # Move runtime libraries to $lib. mkdir -p $lib/lib ln -s lib $lib/lib64 - mv -v $out/lib/lib*.so $out/lib/lib*.so.*[0-9] $out/lib/*.la $lib/lib/ + moveToOutput "lib/lib*.so" "$lib" + moveToOutput "lib/lib*.so.*[0-9]" "$lib" + moveToOutput "lib/*.la" "$lib" for i in $lib/lib/*.la; do substituteInPlace $i --replace $out $lib done diff --git a/pkgs/development/compilers/gcc/4.6/default.nix b/pkgs/development/compilers/gcc/4.6/default.nix index 7003f4335c8..9f6e2954181 100644 --- a/pkgs/development/compilers/gcc/4.6/default.nix +++ b/pkgs/development/compilers/gcc/4.6/default.nix @@ -229,11 +229,11 @@ stdenv.mkDerivation ({ sed -i "${gnu_h}" \ -es'|LIB_SPEC *"\(.*\)$|LIB_SPEC "${extraLibSpec} \1|g' - echo "setting \`NATIVE_SYSTEM_HEADER_DIR' and \`STANDARD_INCLUDE_DIR' to \`${libc}/include'..." + echo "setting \`NATIVE_SYSTEM_HEADER_DIR' and \`STANDARD_INCLUDE_DIR' to \`${libc.dev}/include'..." sed -i "${gnu_h}" \ - -es'|#define STANDARD_INCLUDE_DIR.*$|#define STANDARD_INCLUDE_DIR "${libc}/include"|g' + -es'|#define STANDARD_INCLUDE_DIR.*$|#define STANDARD_INCLUDE_DIR "${libc.dev}/include"|g' sed -i gcc/config/t-gnu \ - -es'|NATIVE_SYSTEM_HEADER_DIR.*$|NATIVE_SYSTEM_HEADER_DIR = ${libc}/include|g' + -es'|NATIVE_SYSTEM_HEADER_DIR.*$|NATIVE_SYSTEM_HEADER_DIR = ${libc.dev}/include|g' '' else if cross != null || stdenv.cc.libc != null then # 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 echo " fixing \`$header'..." sed -i "$header" \ - -e 's|define[[:blank:]]*\([UCG]\+\)LIBC_DYNAMIC_LINKER\([0-9]*\)[[:blank:]]"\([^\"]\+\)"$|define \1LIBC_DYNAMIC_LINKER\2 "${libc}\3"|g' + -e 's|define[[:blank:]]*\([UCG]\+\)LIBC_DYNAMIC_LINKER\([0-9]*\)[[:blank:]]"\([^\"]\+\)"$|define \1LIBC_DYNAMIC_LINKER\2 "${libc.out}\3"|g' done '' else null; @@ -421,15 +421,28 @@ stdenv.mkDerivation ({ ++ optional (libpthread != null) libpthread))); EXTRA_TARGET_CFLAGS = - if cross != null && libcCross != null - then "-idirafter ${libcCross}/include" + if cross != null && libcCross != null then [ + "-idirafter ${libcCross.dev}/include" + ] + ++ optionals (! crossStageStatic) [ + "-B${libcCross.out}/lib" + ] else null; EXTRA_TARGET_LDFLAGS = - if cross != null && libcCross != null - then "-B${libcCross}/lib -Wl,-L${libcCross}/lib" + - (optionalString (libpthreadCross != null) - " -L${libpthreadCross}/lib -Wl,${libpthreadCross.TARGET_LDFLAGS}") + if cross != null && libcCross != null then [ + "-Wl,-L${libcCross.out}/lib" + ] + ++ (if crossStageStatic then [ + "-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; passthru = { inherit langC langCC langAda langFortran langVhdl diff --git a/pkgs/development/compilers/gcc/4.8/default.nix b/pkgs/development/compilers/gcc/4.8/default.nix index 6810b52574c..db8f6282b82 100644 --- a/pkgs/development/compilers/gcc/4.8/default.nix +++ b/pkgs/development/compilers/gcc/4.8/default.nix @@ -255,9 +255,9 @@ stdenv.mkDerivation ({ sed -i "${gnu_h}" \ -es'|LIB_SPEC *"\(.*\)$|LIB_SPEC "${extraLibSpec} \1|g' - echo "setting \`NATIVE_SYSTEM_HEADER_DIR' and \`STANDARD_INCLUDE_DIR' to \`${libc}/include'..." + echo "setting \`NATIVE_SYSTEM_HEADER_DIR' and \`STANDARD_INCLUDE_DIR' to \`${libc.dev}/include'..." sed -i "${gnu_h}" \ - -es'|#define STANDARD_INCLUDE_DIR.*$|#define STANDARD_INCLUDE_DIR "${libc}/include"|g' + -es'|#define STANDARD_INCLUDE_DIR.*$|#define STANDARD_INCLUDE_DIR "${libc.dev}/include"|g' '' else if cross != null || stdenv.cc.libc != null then # 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 echo " fixing \`$header'..." sed -i "$header" \ - -e 's|define[[:blank:]]*\([UCG]\+\)LIBC_DYNAMIC_LINKER\([0-9]*\)[[:blank:]]"\([^\"]\+\)"$|define \1LIBC_DYNAMIC_LINKER\2 "${libc}\3"|g' + -e 's|define[[:blank:]]*\([UCG]\+\)LIBC_DYNAMIC_LINKER\([0-9]*\)[[:blank:]]"\([^\"]\+\)"$|define \1LIBC_DYNAMIC_LINKER\2 "${libc.out}\3"|g' done '' else null; @@ -482,15 +482,28 @@ stdenv.mkDerivation ({ ++ optional (libpthread != null) libpthread))); EXTRA_TARGET_CFLAGS = - if cross != null && libcCross != null - then "-idirafter ${libcCross}/include" + if cross != null && libcCross != null then [ + "-idirafter ${libcCross.dev}/include" + ] + ++ optionals (! crossStageStatic) [ + "-B${libcCross.out}/lib" + ] else null; EXTRA_TARGET_LDFLAGS = - if cross != null && libcCross != null - then "-B${libcCross}/lib -Wl,-L${libcCross}/lib" + - (optionalString (libpthreadCross != null) - " -L${libpthreadCross}/lib -Wl,${libpthreadCross.TARGET_LDFLAGS}") + if cross != null && libcCross != null then [ + "-Wl,-L${libcCross.out}/lib" + ] + ++ (if crossStageStatic then [ + "-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; passthru = diff --git a/pkgs/development/compilers/gcc/4.9/default.nix b/pkgs/development/compilers/gcc/4.9/default.nix index 195a7b03eed..97bdeecb5a2 100644 --- a/pkgs/development/compilers/gcc/4.9/default.nix +++ b/pkgs/development/compilers/gcc/4.9/default.nix @@ -258,9 +258,9 @@ stdenv.mkDerivation ({ sed -i "${gnu_h}" \ -es'|LIB_SPEC *"\(.*\)$|LIB_SPEC "${extraLibSpec} \1|g' - echo "setting \`NATIVE_SYSTEM_HEADER_DIR' and \`STANDARD_INCLUDE_DIR' to \`${libc}/include'..." + echo "setting \`NATIVE_SYSTEM_HEADER_DIR' and \`STANDARD_INCLUDE_DIR' to \`${libc.dev}/include'..." sed -i "${gnu_h}" \ - -es'|#define STANDARD_INCLUDE_DIR.*$|#define STANDARD_INCLUDE_DIR "${libc}/include"|g' + -es'|#define STANDARD_INCLUDE_DIR.*$|#define STANDARD_INCLUDE_DIR "${libc.dev}/include"|g' '' else if cross != null || stdenv.cc.libc != null then # 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 echo " fixing \`$header'..." sed -i "$header" \ - -e 's|define[[:blank:]]*\([UCG]\+\)LIBC_DYNAMIC_LINKER\([0-9]*\)[[:blank:]]"\([^\"]\+\)"$|define \1LIBC_DYNAMIC_LINKER\2 "${libc}\3"|g' + -e 's|define[[:blank:]]*\([UCG]\+\)LIBC_DYNAMIC_LINKER\([0-9]*\)[[:blank:]]"\([^\"]\+\)"$|define \1LIBC_DYNAMIC_LINKER\2 "${libc.out}\3"|g' done '' else null; @@ -489,15 +489,28 @@ stdenv.mkDerivation ({ ++ optional (libpthread != null) libpthread))); EXTRA_TARGET_CFLAGS = - if cross != null && libcCross != null - then "-idirafter ${libcCross}/include" + if cross != null && libcCross != null then [ + "-idirafter ${libcCross.dev}/include" + ] + ++ optionals (! crossStageStatic) [ + "-B${libcCross.out}/lib" + ] else null; EXTRA_TARGET_LDFLAGS = - if cross != null && libcCross != null - then "-B${libcCross}/lib -Wl,-L${libcCross}/lib" + - (optionalString (libpthreadCross != null) - " -L${libpthreadCross}/lib -Wl,${libpthreadCross.TARGET_LDFLAGS}") + if cross != null && libcCross != null then [ + "-Wl,-L${libcCross.out}/lib" + ] + ++ (if crossStageStatic then [ + "-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; passthru = From fa4fcaf6b46af3fb4f0273bb657f96223763ac86 Mon Sep 17 00:00:00 2001 From: Eric Litak Date: Tue, 31 May 2016 15:29:16 -0700 Subject: [PATCH 13/28] darwin output paths --- pkgs/development/compilers/gcc/4.8/default.nix | 4 ++-- pkgs/development/compilers/gcc/4.9/default.nix | 4 ++-- pkgs/development/compilers/gcc/5/default.nix | 4 ++-- pkgs/development/compilers/gcc/6/default.nix | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/pkgs/development/compilers/gcc/4.8/default.nix b/pkgs/development/compilers/gcc/4.8/default.nix index db8f6282b82..99b3de471fa 100644 --- a/pkgs/development/compilers/gcc/4.8/default.nix +++ b/pkgs/development/compilers/gcc/4.8/default.nix @@ -164,8 +164,8 @@ let version = "4.8.5"; " --disable-libatomic " + # libatomic requires libc " --disable-decimal-float" # libdecnumber requires libc else - (if crossDarwin then " --with-sysroot=${libcCross}/share/sysroot" - else " --with-headers=${libcCross}/include") + + (if crossDarwin then " --with-sysroot=${libcCross.out}/share/sysroot" + else " --with-headers=${libcCross.dev}/include") + # Ensure that -print-prog-name is able to find the correct programs. (stdenv.lib.optionalString (crossMingw || crossDarwin) ( " --with-as=${binutilsCross}/bin/${cross.config}-as" + diff --git a/pkgs/development/compilers/gcc/4.9/default.nix b/pkgs/development/compilers/gcc/4.9/default.nix index 97bdeecb5a2..5c310300828 100644 --- a/pkgs/development/compilers/gcc/4.9/default.nix +++ b/pkgs/development/compilers/gcc/4.9/default.nix @@ -166,8 +166,8 @@ let version = "4.9.3"; " --disable-libatomic " + # libatomic requires libc " --disable-decimal-float" # libdecnumber requires libc else - (if crossDarwin then " --with-sysroot=${libcCross}/share/sysroot" - else " --with-headers=${libcCross}/include") + + (if crossDarwin then " --with-sysroot=${libcCross.out}/share/sysroot" + else " --with-headers=${libcCross.dev}/include") + # Ensure that -print-prog-name is able to find the correct programs. (stdenv.lib.optionalString (crossMingw || crossDarwin) ( " --with-as=${binutilsCross}/bin/${cross.config}-as" + diff --git a/pkgs/development/compilers/gcc/5/default.nix b/pkgs/development/compilers/gcc/5/default.nix index 2512e90ff03..3c9d8772f61 100644 --- a/pkgs/development/compilers/gcc/5/default.nix +++ b/pkgs/development/compilers/gcc/5/default.nix @@ -165,8 +165,8 @@ let version = "5.3.0"; " --disable-libatomic " + # libatomic requires libc " --disable-decimal-float" # libdecnumber requires libc else - (if crossDarwin then " --with-sysroot=${libcCross}/share/sysroot" - else " --with-headers=${libcCross}/include") + + (if crossDarwin then " --with-sysroot=${libcCross.out}/share/sysroot" + else " --with-headers=${libcCross.dev}/include") + # Ensure that -print-prog-name is able to find the correct programs. (stdenv.lib.optionalString (crossMingw || crossDarwin) ( " --with-as=${binutilsCross}/bin/${cross.config}-as" + diff --git a/pkgs/development/compilers/gcc/6/default.nix b/pkgs/development/compilers/gcc/6/default.nix index be99237bfdb..d281488fd50 100644 --- a/pkgs/development/compilers/gcc/6/default.nix +++ b/pkgs/development/compilers/gcc/6/default.nix @@ -165,8 +165,8 @@ let version = "6.1.0"; " --disable-libatomic " + # libatomic requires libc " --disable-decimal-float" # libdecnumber requires libc else - (if crossDarwin then " --with-sysroot=${libcCross}/share/sysroot" - else " --with-headers=${libcCross}/include") + + (if crossDarwin then " --with-sysroot=${libcCross.out}/share/sysroot" + else " --with-headers=${libcCross.dev}/include") + # Ensure that -print-prog-name is able to find the correct programs. (stdenv.lib.optionalString (crossMingw || crossDarwin) ( " --with-as=${binutilsCross}/bin/${cross.config}-as" + From 772c92ba5c60ab63694bdffbf847ed7434aa3142 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Thu, 9 Jun 2016 13:21:31 +0200 Subject: [PATCH 14/28] gcc: maintenance 5.3 -> 5.4 --- pkgs/development/compilers/gcc/5/default.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkgs/development/compilers/gcc/5/default.nix b/pkgs/development/compilers/gcc/5/default.nix index 9e0220ffc72..00a1e3f9d73 100644 --- a/pkgs/development/compilers/gcc/5/default.nix +++ b/pkgs/development/compilers/gcc/5/default.nix @@ -58,7 +58,8 @@ assert langGo -> langCC; with stdenv.lib; with builtins; -let version = "5.3.0"; +let version = "5.4.0"; + sha256 = "0fihlcy5hnksdxk0sn6bvgnyq8gfrgs8m794b1jxwd1dxinzg3b0"; # Whether building a cross-compiler for GNU/Hurd. crossGNU = cross != null && cross.config == "i586-pc-gnu"; @@ -212,7 +213,7 @@ stdenv.mkDerivation ({ src = fetchurl { url = "mirror://gnu/gcc/gcc-${version}/gcc-${version}.tar.bz2"; - sha256 = "1ny4smkp5bzs3cp8ss7pl6lk8yss0d9m4av1mvdp72r1x695akxq"; + inherit sha256; }; inherit patches; From 7a5b85cdda7d619ec81de124e601e2333084dce4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Domen=20Ko=C5=BEar?= Date: Sun, 29 May 2016 14:25:09 +0100 Subject: [PATCH 15/28] pkgs.runCommand: passAsFile (buildCommand can be very long) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Close #15803. This avoids the error: while setting up the build environment: executing ‘/nix/store/7sb42axk5lrxqz45nldrb2pchlys14s1-bash-4.3-p42/bin/bash’: Argument list too long Note: I wanted to make it optional based on buildCommand length, but that seems pointless as I'm sure it's less performant. Amended by vcunat: https://github.com/NixOS/nixpkgs/pull/15803#issuecomment-224841225 --- pkgs/build-support/trivial-builders.nix | 1 + pkgs/stdenv/generic/setup.sh | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/pkgs/build-support/trivial-builders.nix b/pkgs/build-support/trivial-builders.nix index 73f4d7783c4..18e49105ae7 100644 --- a/pkgs/build-support/trivial-builders.nix +++ b/pkgs/build-support/trivial-builders.nix @@ -8,6 +8,7 @@ rec { runCommand = name: env: buildCommand: stdenv.mkDerivation ({ inherit name buildCommand; + passAsFile = [ "buildCommand" ]; } // env); diff --git a/pkgs/stdenv/generic/setup.sh b/pkgs/stdenv/generic/setup.sh index 85e74461d2a..5b50167d9b9 100644 --- a/pkgs/stdenv/generic/setup.sh +++ b/pkgs/stdenv/generic/setup.sh @@ -827,6 +827,10 @@ showPhaseHeader() { genericBuild() { + if [ -f "$buildCommandPath" ]; then + . "$buildCommandPath" + return + fi if [ -n "$buildCommand" ]; then eval "$buildCommand" return From 2d3d105b02a6057dcac1c4e78472e8b55cc8ad30 Mon Sep 17 00:00:00 2001 From: Tuomas Tynkkynen Date: Wed, 1 Jun 2016 13:18:58 +0300 Subject: [PATCH 16/28] make-bootstrap-tools-cross.nix: Strip extra whitespace --- .../linux/make-bootstrap-tools-cross.nix | 38 +++++++++---------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/pkgs/stdenv/linux/make-bootstrap-tools-cross.nix b/pkgs/stdenv/linux/make-bootstrap-tools-cross.nix index d6e024c6258..16099dfb3d3 100644 --- a/pkgs/stdenv/linux/make-bootstrap-tools-cross.nix +++ b/pkgs/stdenv/linux/make-bootstrap-tools-cross.nix @@ -5,7 +5,7 @@ let buildFor = toolsArch: ( let pkgsFun = import ../../..; pkgsNoParams = pkgsFun {}; - + sheevaplugCrossSystem = { crossSystem = rec { config = "armv5tel-unknown-linux-gnueabi"; @@ -18,10 +18,10 @@ let openssl.system = "linux-generic32"; }; }; - + raspberrypiCrossSystem = { crossSystem = rec { - config = "armv6l-unknown-linux-gnueabi"; + config = "armv6l-unknown-linux-gnueabi"; bigEndian = false; arch = "arm"; float = "hard"; @@ -33,10 +33,10 @@ let inherit (platform) gcc; }; }; - + armv7l-hf-multiplatform-crossSystem = { crossSystem = rec { - config = "armv7l-unknown-linux-gnueabi"; + config = "armv7l-unknown-linux-gnueabi"; bigEndian = false; arch = "arm"; float = "hard"; @@ -48,7 +48,7 @@ let inherit (platform) gcc; }; }; - + selectedCrossSystem = if toolsArch == "armv5tel" then sheevaplugCrossSystem else if toolsArch == "armv6l" then raspberrypiCrossSystem else @@ -91,13 +91,13 @@ rec { coreutilsMinimal = (pkgs.coreutils.override (args: { aclSupport = false; })).crossDrv; - + curlMinimal = (pkgs.curl.override { zlibSupport = false; sslSupport = false; scpSupport = false; }).crossDrv; - + busyboxMinimal = (pkgs.busybox.override { # TBD: uClibc is broken. # useUclibc = true; @@ -113,10 +113,10 @@ rec { CONFIG_UNXZ y ''; }).crossDrv; - + inherit pkgs; - build = + build = stdenv.mkDerivation { name = "build"; @@ -126,7 +126,7 @@ rec { crossConfig = stdenv.cross.config; buildCommand = '' - set -x + set -x mkdir -p $out/bin $out/lib $out/libexec # 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/libresolv*.so* $out/lib cp -d ${glibc.out}/lib/crt?.o $out/lib - + cp -rL ${glibc.dev}/include $out chmod -R u+w $out/include - + # Hopefully we won't need these. 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.cmd -exec rm {} \; mv $out/include $out/include-glibc - + # Copy coreutils, bash, etc. cp ${coreutilsMinimal}/bin/* $out/bin (cd $out/bin && rm vdir dir sha*sum pinky factor pathchk runcon shuf who whoami shred users) - + cp ${bash}/bin/bash $out/bin cp ${findutils}/bin/find $out/bin cp ${findutils}/bin/xargs $out/bin @@ -174,7 +174,7 @@ rec { cp -d ${curlMinimal}/lib/libcurl* $out/lib cp -d ${gnugrep.pcre.crossDrv}/lib/libpcre*.so* $out/lib # needed by grep - + # Copy what we need of GCC. cp -d ${gcc}/bin/gcc $out/bin cp -d ${gcc}/bin/cpp $out/bin @@ -203,12 +203,12 @@ rec { cp -d ${libmpc}/lib/libmpc*.so* $out/lib cp -d ${zlib.out}/lib/libz.so* $out/lib cp -d ${libelf}/lib/libelf.so* $out/lib - + # TBD: Why are these needed for cross but not native tools? cp -d ${cloogppl}/lib/libcloog*.so* $out/lib cp -d ${cloog}/lib/libcloog*.so* $out/lib cp -d ${isl}/lib/libisl*.so* $out/lib - + # Copy binutils. for i in as ld ar ranlib nm strip readelf objdump; do cp ${binutils}/bin/$i $out/bin @@ -216,7 +216,7 @@ rec { cp -d ${binutils.out}/lib/lib*.so* $out/lib chmod -R u+w $out - + # Strip executables even further. for i in $out/bin/* $out/libexec/gcc/*/*/*; do if test -x $i -a ! -L $i; then From 5fe4076683cef025f366b0723b170b10140ce211 Mon Sep 17 00:00:00 2001 From: Tuomas Tynkkynen Date: Mon, 4 Jan 2016 22:46:06 +0200 Subject: [PATCH 17/28] gcc: Pass --with-mpc in crossAttrs Just for consistency, it should be already coming from buildInputs anyway. --- pkgs/development/compilers/gcc/4.5/default.nix | 1 + pkgs/development/compilers/gcc/4.6/default.nix | 1 + pkgs/development/compilers/gcc/4.8/default.nix | 1 + pkgs/development/compilers/gcc/4.9/default.nix | 1 + pkgs/development/compilers/gcc/5/default.nix | 1 + 5 files changed, 5 insertions(+) diff --git a/pkgs/development/compilers/gcc/4.5/default.nix b/pkgs/development/compilers/gcc/4.5/default.nix index d8848a979f4..69ff590a631 100644 --- a/pkgs/development/compilers/gcc/4.5/default.nix +++ b/pkgs/development/compilers/gcc/4.5/default.nix @@ -284,6 +284,7 @@ stdenv.mkDerivation ({ ${if langJava && javaAntlr != null then "--with-antlr-jar=${javaAntlr.crossDrv}" else ""} --with-gmp=${gmp.crossDrv} --with-mpfr=${mpfr.crossDrv} + --with-mpc=${libmpc.crossDrv} --disable-libstdcxx-pch --without-included-gettext --with-system-zlib diff --git a/pkgs/development/compilers/gcc/4.6/default.nix b/pkgs/development/compilers/gcc/4.6/default.nix index 9f6e2954181..330f8a7cf8e 100644 --- a/pkgs/development/compilers/gcc/4.6/default.nix +++ b/pkgs/development/compilers/gcc/4.6/default.nix @@ -357,6 +357,7 @@ stdenv.mkDerivation ({ ${if langJava && javaAntlr != null then "--with-antlr-jar=${javaAntlr.crossDrv}" else ""} --with-gmp=${gmp.crossDrv} --with-mpfr=${mpfr.crossDrv} + --with-mpc=${libmpc.crossDrv} --disable-libstdcxx-pch --without-included-gettext --with-system-zlib diff --git a/pkgs/development/compilers/gcc/4.8/default.nix b/pkgs/development/compilers/gcc/4.8/default.nix index 99b3de471fa..32a43a24efd 100644 --- a/pkgs/development/compilers/gcc/4.8/default.nix +++ b/pkgs/development/compilers/gcc/4.8/default.nix @@ -415,6 +415,7 @@ stdenv.mkDerivation ({ ${if langJava && javaAntlr != null then "--with-antlr-jar=${javaAntlr.crossDrv}" else ""} --with-gmp=${gmp.crossDrv} --with-mpfr=${mpfr.crossDrv} + --with-mpc=${libmpc.crossDrv} --disable-libstdcxx-pch --without-included-gettext --with-system-zlib diff --git a/pkgs/development/compilers/gcc/4.9/default.nix b/pkgs/development/compilers/gcc/4.9/default.nix index 5c310300828..6a9078fefce 100644 --- a/pkgs/development/compilers/gcc/4.9/default.nix +++ b/pkgs/development/compilers/gcc/4.9/default.nix @@ -422,6 +422,7 @@ stdenv.mkDerivation ({ ${if langJava && javaAntlr != null then "--with-antlr-jar=${javaAntlr.crossDrv}" else ""} --with-gmp=${gmp.crossDrv} --with-mpfr=${mpfr.crossDrv} + --with-mpc=${libmpc.crossDrv} --disable-libstdcxx-pch --without-included-gettext --with-system-zlib diff --git a/pkgs/development/compilers/gcc/5/default.nix b/pkgs/development/compilers/gcc/5/default.nix index 3dcbbd4155e..a73d1fd7c9e 100644 --- a/pkgs/development/compilers/gcc/5/default.nix +++ b/pkgs/development/compilers/gcc/5/default.nix @@ -416,6 +416,7 @@ stdenv.mkDerivation ({ ${if langJava && javaAntlr != null then "--with-antlr-jar=${javaAntlr.crossDrv}" else ""} --with-gmp=${gmp.crossDrv} --with-mpfr=${mpfr.crossDrv} + --with-mpc=${libmpc.crossDrv} --disable-libstdcxx-pch --without-included-gettext --with-system-zlib From aaf008bda42e51c48c72d95f1e6dbd548c0b18c2 Mon Sep 17 00:00:00 2001 From: Tuomas Tynkkynen Date: Wed, 1 Jun 2016 23:00:28 +0300 Subject: [PATCH 18/28] libelf: Fix cross compilation --- pkgs/development/libraries/libelf/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/development/libraries/libelf/default.nix b/pkgs/development/libraries/libelf/default.nix index 623256bb6b7..12588617d4a 100644 --- a/pkgs/development/libraries/libelf/default.nix +++ b/pkgs/development/libraries/libelf/default.nix @@ -9,10 +9,10 @@ stdenv.mkDerivation rec { }; doCheck = true; - + # For cross-compiling, native glibc is needed for the "gencat" program. crossAttrs = { - nativeBuildInputs = [ glibc ]; + nativeBuildInputs = [ gettext glibc ]; }; # 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. configureFlags = stdenv.lib.optional stdenv.isDarwin "--disable-nls"; - buildInputs = [ gettext ]; + nativeBuildInputs = [ gettext ]; meta = { description = "ELF object file access library"; From a06a405d0bf57699a8fb9976c6acae08641852cc Mon Sep 17 00:00:00 2001 From: Tuomas Tynkkynen Date: Wed, 1 Jun 2016 23:01:24 +0300 Subject: [PATCH 19/28] cross GCC: Fix some paths to libc headers (after multiple outputs) It's not completely clear to me why the path to libc headers is set differently when cross building... --- pkgs/build-support/cc-wrapper/default.nix | 1 + pkgs/build-support/gcc-cross-wrapper/builder.sh | 1 + pkgs/build-support/gcc-cross-wrapper/default.nix | 1 + pkgs/development/compilers/gcc/builder.sh | 13 +++++++------ 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/pkgs/build-support/cc-wrapper/default.nix b/pkgs/build-support/cc-wrapper/default.nix index da114fdb347..a37c806905f 100644 --- a/pkgs/build-support/cc-wrapper/default.nix +++ b/pkgs/build-support/cc-wrapper/default.nix @@ -96,6 +96,7 @@ stdenv.mkDerivation { echo "-L${libc_lib}/lib" > $out/nix-support/libc-ldflags echo "${libc_lib}" > $out/nix-support/orig-libc + echo "${libc_dev}" > $out/nix-support/orig-libc-dev '' + (if nativeTools then '' diff --git a/pkgs/build-support/gcc-cross-wrapper/builder.sh b/pkgs/build-support/gcc-cross-wrapper/builder.sh index c6bc2a7c8bf..9396ace84f1 100644 --- a/pkgs/build-support/gcc-cross-wrapper/builder.sh +++ b/pkgs/build-support/gcc-cross-wrapper/builder.sh @@ -111,6 +111,7 @@ chmod +x "$out/bin/$crossConfig-ld" # Glibc. test -n "$gcc" && echo $gcc > $out/nix-support/orig-cc 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" diff --git a/pkgs/build-support/gcc-cross-wrapper/default.nix b/pkgs/build-support/gcc-cross-wrapper/default.nix index fe2a530e1e8..505d80a6b2a 100644 --- a/pkgs/build-support/gcc-cross-wrapper/default.nix +++ b/pkgs/build-support/gcc-cross-wrapper/default.nix @@ -46,6 +46,7 @@ stdenv.mkDerivation { addFlags = ./add-flags; inherit nativeTools nativeLibc nativePrefix gcc 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; osxMinVersion = cross.osxMinVersion or null; gccLibs = if gcc != null then gccLibs else null; diff --git a/pkgs/development/compilers/gcc/builder.sh b/pkgs/development/compilers/gcc/builder.sh index bff96d274ac..6b09cfd59ed 100644 --- a/pkgs/development/compilers/gcc/builder.sh +++ b/pkgs/development/compilers/gcc/builder.sh @@ -86,15 +86,16 @@ if test "$noSysDirs" = "1"; then 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)" - # Use *real* header files, otherwise a limits.h is generated - # that does not include Glibc's limits.h (notably missing - # SSIZE_MAX, which breaks the build). - 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" + 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 + # that does not include Glibc's limits.h (notably missing + # SSIZE_MAX, which breaks the build). + NIX_FIXINC_DUMMY_CROSS="$glibc_devdir/include" extraFlags="-I$NIX_FIXINC_DUMMY_CROSS $extraFlags" extraLDFlags="-L$glibc_libdir -rpath $glibc_libdir $extraLDFlags" From ab450c0909411be75adb671bc892987e608f16b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Sat, 11 Jun 2016 09:57:31 +0200 Subject: [PATCH 20/28] gcc: fixup the tarball job after merging #15867 The evaluation problem happened in while checking find-tarballs.nix http://hydra.nixos.org/build/36754203/nixlog/1/raw (it didn't seem worth digging into why exactly) --- pkgs/development/compilers/gcc/5/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/development/compilers/gcc/5/default.nix b/pkgs/development/compilers/gcc/5/default.nix index a73d1fd7c9e..9ab725e2da8 100644 --- a/pkgs/development/compilers/gcc/5/default.nix +++ b/pkgs/development/compilers/gcc/5/default.nix @@ -166,8 +166,8 @@ let version = "5.4.0"; " --disable-libatomic " + # libatomic requires libc " --disable-decimal-float" # libdecnumber requires libc else - (if crossDarwin then " --with-sysroot=${libcCross.out}/share/sysroot" - else " --with-headers=${libcCross.dev}/include") + + (if crossDarwin then " --with-sysroot=${getLib libcCross}/share/sysroot" + else " --with-headers=${getDev libcCross}/include") + # Ensure that -print-prog-name is able to find the correct programs. (stdenv.lib.optionalString (crossMingw || crossDarwin) ( " --with-as=${binutilsCross}/bin/${cross.config}-as" + @@ -485,7 +485,7 @@ stdenv.mkDerivation ({ EXTRA_TARGET_CFLAGS = if cross != null && libcCross != null then [ - "-idirafter ${libcCross.dev}/include" + "-idirafter ${getDev libcCross}/include" ] ++ optionals (! crossStageStatic) [ "-B${libcCross.out}/lib" From e9c612cdfe9852a394fd3e68e6f88deacdd9903c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Mon, 13 Jun 2016 10:11:45 +0200 Subject: [PATCH 21/28] rr: fix build after gcc-5.4 bump Discussion: https://github.com/NixOS/nixpkgs/commit/772c92ba5c60a --- pkgs/development/tools/analysis/rr/default.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/development/tools/analysis/rr/default.nix b/pkgs/development/tools/analysis/rr/default.nix index 926aaeb94cc..26d98ed866b 100644 --- a/pkgs/development/tools/analysis/rr/default.nix +++ b/pkgs/development/tools/analysis/rr/default.nix @@ -11,8 +11,9 @@ stdenv.mkDerivation rec { sha256 = "03fl2wgbc1cilaw8hrhfqjsbpi05cid6k4cr3s2vmv5gx0dnrgy4"; }; - patchPhase = '' + postPatch = '' substituteInPlace src/Command.cc --replace '_BSD_SOURCE' '_DEFAULT_SOURCE' + sed '7i#include "math.h"' -i src/Scheduler.cc patchShebangs . ''; From d133a168f082d2f4c94984190e836e55f5e389a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Mon, 13 Jun 2016 10:15:48 +0200 Subject: [PATCH 22/28] rr: improve the parent commit --- pkgs/development/tools/analysis/rr/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/tools/analysis/rr/default.nix b/pkgs/development/tools/analysis/rr/default.nix index 26d98ed866b..84ab79879b4 100644 --- a/pkgs/development/tools/analysis/rr/default.nix +++ b/pkgs/development/tools/analysis/rr/default.nix @@ -13,7 +13,7 @@ stdenv.mkDerivation rec { postPatch = '' substituteInPlace src/Command.cc --replace '_BSD_SOURCE' '_DEFAULT_SOURCE' - sed '7i#include "math.h"' -i src/Scheduler.cc + sed '7i#include ' -i src/Scheduler.cc patchShebangs . ''; From 2a91dd0f65c44ef72cc7df6f51fbb56164fad728 Mon Sep 17 00:00:00 2001 From: Dmitry Kalinkin Date: Fri, 17 Jun 2016 06:18:33 -0400 Subject: [PATCH 23/28] krb5: fix for stores with paths containing '+' character --- pkgs/development/libraries/kerberos/krb5.nix | 2 + .../libraries/kerberos/path_char_fix.patch | 37 +++++++++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 pkgs/development/libraries/kerberos/path_char_fix.patch diff --git a/pkgs/development/libraries/kerberos/krb5.nix b/pkgs/development/libraries/kerberos/krb5.nix index 332ca526b6b..78644200e0b 100644 --- a/pkgs/development/libraries/kerberos/krb5.nix +++ b/pkgs/development/libraries/kerberos/krb5.nix @@ -26,6 +26,8 @@ stdenv.mkDerivation rec { buildInputs = [ openssl ] ++ optionals (!libOnly) [ openldap libedit ]; + patches = [ ./path_char_fix.patch ]; + preConfigure = "cd ./src"; buildPhase = optionalString libOnly '' diff --git a/pkgs/development/libraries/kerberos/path_char_fix.patch b/pkgs/development/libraries/kerberos/path_char_fix.patch new file mode 100644 index 00000000000..976c2d65c5b --- /dev/null +++ b/pkgs/development/libraries/kerberos/path_char_fix.patch @@ -0,0 +1,37 @@ +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 + From 97c484a10f4b38efc4fb3dd210defed96003ae7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Sun, 19 Jun 2016 10:18:30 +0200 Subject: [PATCH 24/28] treewide: fix #include errors after gcc-5.4 They were mostly missing or . --- pkgs/applications/graphics/leocad/default.nix | 1 + pkgs/applications/graphics/photivo/default.nix | 12 ++++++++---- pkgs/applications/misc/cli-visualizer/default.nix | 4 ++++ pkgs/applications/misc/termite/default.nix | 2 ++ .../science/robotics/qgroundcontrol/default.nix | 5 +++++ .../video/simplescreenrecorder/default.nix | 4 ++++ .../kde-5/plasma-5.6/plasma-desktop/default.nix | 3 +++ pkgs/development/libraries/botan/generic.nix | 2 ++ pkgs/development/libraries/botan/unstable.nix | 1 + pkgs/development/libraries/xgboost/default.nix | 2 ++ pkgs/development/tools/misc/hydra/default.nix | 8 +++++++- pkgs/games/cataclysm-dda/default.nix | 3 +++ pkgs/games/dwarf-fortress/dfhack/default.nix | 1 + pkgs/games/dwarf-fortress/unfuck.nix | 2 ++ pkgs/games/openspades/default.nix | 5 ++++- pkgs/games/openspades/git.nix | 2 ++ pkgs/games/the-butterfly-effect/default.nix | 4 ++++ pkgs/misc/emulators/higan/default.nix | 1 + pkgs/misc/emulators/pcsx2/default.nix | 4 ++++ pkgs/os-specific/linux/sysdig/default.nix | 3 +++ 20 files changed, 63 insertions(+), 6 deletions(-) diff --git a/pkgs/applications/graphics/leocad/default.nix b/pkgs/applications/graphics/leocad/default.nix index 884dc115853..96384765bd0 100644 --- a/pkgs/applications/graphics/leocad/default.nix +++ b/pkgs/applications/graphics/leocad/default.nix @@ -17,6 +17,7 @@ stdenv.mkDerivation rec { buildInputs = [ qt4 qmake4Hook zlib ]; postPatch = '' + sed '1i#include ' -i common/camera.cpp substituteInPlace common/camera.cpp --replace "isnan(" "std::isnan(" export qmakeFlags="$qmakeFlags INSTALL_PREFIX=$out" ''; diff --git a/pkgs/applications/graphics/photivo/default.nix b/pkgs/applications/graphics/photivo/default.nix index 12816ba96af..d84363df899 100644 --- a/pkgs/applications/graphics/photivo/default.nix +++ b/pkgs/applications/graphics/photivo/default.nix @@ -10,15 +10,19 @@ stdenv.mkDerivation rec { sha256 = "0f6y18k7db2ci6xn664zcwm1g1k04sdv7gg1yd5jk41bndjb7z8h"; }; - nativeBuildInputs = [ cmake pkgconfig ]; - - buildInputs = [ qt4 fftw graphicsmagick_q16 lcms2 lensfun libjpeg exiv2 liblqr1 ]; - patchPhase = '' # kinda icky + postPatch = '' # kinda icky sed -e '/("@INSTALL@")/d' \ -e s,@INSTALL@,$out/share/photivo, \ -i Sources/ptSettings.cpp + sed '1i#include ' -i Sources/filters/ptFilter_StdCurve.cpp ''; + nativeBuildInputs = [ cmake pkgconfig ]; + + buildInputs = [ qt4 fftw graphicsmagick_q16 lcms2 lensfun libjpeg exiv2 liblqr1 ]; + + enableParallelBuilding = true; + meta = with stdenv.lib; { platforms = platforms.linux; maintainers = [ maintainers.mornfall ]; diff --git a/pkgs/applications/misc/cli-visualizer/default.nix b/pkgs/applications/misc/cli-visualizer/default.nix index 6b9856a996a..1c7fd62f8ec 100644 --- a/pkgs/applications/misc/cli-visualizer/default.nix +++ b/pkgs/applications/misc/cli-visualizer/default.nix @@ -10,6 +10,10 @@ stdenv.mkDerivation rec { sha256 = "16768gyi85mkizfn874q2q9xf32knw08z27si3k5bk99492dxwzw"; }; + postPatch = '' + sed '1i#include ' -i src/Transformer/SpectrumCircleTransformer.cpp + ''; + buildInputs = [ fftw ncurses libpulseaudio ]; buildFlags = [ "ENABLE_PULSE=1" ]; diff --git a/pkgs/applications/misc/termite/default.nix b/pkgs/applications/misc/termite/default.nix index 33bc29f871c..33c42e3dc1d 100644 --- a/pkgs/applications/misc/termite/default.nix +++ b/pkgs/applications/misc/termite/default.nix @@ -13,6 +13,8 @@ let sha256 = "1cw4yw7n9m2si8b7zcfyz9pyihncabxm5g39v1mxslfajxgwzmd8"; }; + postPatch = "sed '1i#include ' -i termite.cc"; + makeFlags = [ "VERSION=v${version}" "PREFIX=" "DESTDIR=$(out)" ]; buildInputs = [ pkgconfig vte gtk3 ncurses ]; diff --git a/pkgs/applications/science/robotics/qgroundcontrol/default.nix b/pkgs/applications/science/robotics/qgroundcontrol/default.nix index b67da5b5516..37e9c9c858f 100644 --- a/pkgs/applications/science/robotics/qgroundcontrol/default.nix +++ b/pkgs/applications/science/robotics/qgroundcontrol/default.nix @@ -27,6 +27,11 @@ stdenv.mkDerivation rec { ] ++ qtInputs; patches = [ ./0001-fix-gcc-cmath-namespace-issues.patch ]; + postPatch = '' + sed '1i#include ' -i src/Vehicle/Vehicle.cc \ + -i src/comm/{QGCFlightGearLink,QGCJSBSimLink}.cc \ + -i src/{uas/UAS,ui/QGCDataPlot2D}.cc + ''; preConfigure = '' mkdir build diff --git a/pkgs/applications/video/simplescreenrecorder/default.nix b/pkgs/applications/video/simplescreenrecorder/default.nix index a5fb122cf89..3ea04a39393 100644 --- a/pkgs/applications/video/simplescreenrecorder/default.nix +++ b/pkgs/applications/video/simplescreenrecorder/default.nix @@ -11,11 +11,15 @@ stdenv.mkDerivation rec { sha256 = "1d89ncspjd8c4mckf0nb6y3hrxpv4rjpbj868pznhvfmdgr5nvql"; }; + postPatch = "sed '1i#include ' -i src/Benchmark.cpp"; + buildInputs = [ alsaLib ffmpeg libjack2 libX11 libXext libXfixes mesa pkgconfig libpulseaudio qt4 ]; + enableParallelBuilding = true; + meta = with stdenv.lib; { description = "A screen recorder for Linux"; homepage = http://www.maartenbaert.be/simplescreenrecorder; diff --git a/pkgs/desktops/kde-5/plasma-5.6/plasma-desktop/default.nix b/pkgs/desktops/kde-5/plasma-5.6/plasma-desktop/default.nix index 618e7387e62..2a1d95806c1 100644 --- a/pkgs/desktops/kde-5/plasma-5.6/plasma-desktop/default.nix +++ b/pkgs/desktops/kde-5/plasma-5.6/plasma-desktop/default.nix @@ -34,6 +34,9 @@ plasmaPackage rec { }) ./0003-tzdir.patch ]; + postPatch = '' + sed '1i#include ' -i kcms/touchpad/src/backends/x11/synapticstouchpad.cpp + ''; NIX_CFLAGS_COMPILE = [ "-I${xorgserver.dev}/include/xorg" ]; cmakeFlags = [ "-DEvdev_INCLUDE_DIRS=${xf86inputevdev.dev}/include/xorg" diff --git a/pkgs/development/libraries/botan/generic.nix b/pkgs/development/libraries/botan/generic.nix index 823e50e3227..4a4ec5d9fe9 100644 --- a/pkgs/development/libraries/botan/generic.nix +++ b/pkgs/development/libraries/botan/generic.nix @@ -2,6 +2,7 @@ # Passed by version specific builders , baseVersion, revision, sha256 , extraConfigureFlags ? "" +, postPatch ? null , ... }: @@ -17,6 +18,7 @@ stdenv.mkDerivation rec { ]; inherit sha256; }; + inherit postPatch; buildInputs = [ python bzip2 zlib gmp openssl boost ]; diff --git a/pkgs/development/libraries/botan/unstable.nix b/pkgs/development/libraries/botan/unstable.nix index dd185f21035..d952b50aeb8 100644 --- a/pkgs/development/libraries/botan/unstable.nix +++ b/pkgs/development/libraries/botan/unstable.nix @@ -5,4 +5,5 @@ callPackage ./generic.nix (args // { revision = "29"; sha256 = "157bp8716h17agrxyj7xpsj2i5sqhafj1nfx4gpzccx7y2kyq176"; openssl = null; + postPatch = "sed '1i#include ' -i src/tests/test_bigint.cpp"; }) diff --git a/pkgs/development/libraries/xgboost/default.nix b/pkgs/development/libraries/xgboost/default.nix index e3c5d757310..4ba366be56f 100644 --- a/pkgs/development/libraries/xgboost/default.nix +++ b/pkgs/development/libraries/xgboost/default.nix @@ -11,6 +11,8 @@ stdenv.mkDerivation rec { sha256 = "1d7lnbwxwakclqqfjwyk9w3wd2clkihdr6ljs5z08ydiaspri093"; }; + postPatch = "sed '1i#include ' -i src/tree/param.h"; + enableParallelBuilding = true; installPhase = '' diff --git a/pkgs/development/tools/misc/hydra/default.nix b/pkgs/development/tools/misc/hydra/default.nix index 510a0679527..a4f1a96c6a4 100644 --- a/pkgs/development/tools/misc/hydra/default.nix +++ b/pkgs/development/tools/misc/hydra/default.nix @@ -3,7 +3,7 @@ , gitAndTools, mercurial, darcs, subversion, bazaar, openssl, bzip2, libxslt , guile, perl, postgresql92, aws-sdk-cpp, nukeReferences, git, boehmgc , docbook_xsl, openssh, gnused, coreutils, findutils, gzip, lzma, gnutar -, rpm, dpkg, cdrkit }: +, rpm, dpkg, cdrkit, fetchpatch }: with stdenv; @@ -70,6 +70,12 @@ in releaseTools.nixBuild rec { 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 = [ makeWrapper autoconf automake libtool unzip nukeReferences pkgconfig sqlite libpqxx gitAndTools.topGit mercurial darcs subversion bazaar openssl bzip2 libxslt diff --git a/pkgs/games/cataclysm-dda/default.nix b/pkgs/games/cataclysm-dda/default.nix index 3956c994531..b46114ec62b 100644 --- a/pkgs/games/cataclysm-dda/default.nix +++ b/pkgs/games/cataclysm-dda/default.nix @@ -21,6 +21,9 @@ stdenv.mkDerivation rec { sed -i Makefile \ -e 's,-Werror,,g' \ -e 's,\(DATA_PREFIX=$(PREFIX)/share/\)cataclysm-dda/,\1,g' + + sed '1i#include ' \ + -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"; diff --git a/pkgs/games/dwarf-fortress/dfhack/default.nix b/pkgs/games/dwarf-fortress/dfhack/default.nix index 3d3b1c4d9aa..1ee0f829571 100644 --- a/pkgs/games/dwarf-fortress/dfhack/default.nix +++ b/pkgs/games/dwarf-fortress/dfhack/default.nix @@ -39,6 +39,7 @@ in stdenv.mkDerivation rec { }; patches = [ ./use-system-libraries.patch ]; + postPatch = "sed '1i#include ' -i plugins/3dveins.cpp"; nativeBuildInputs = [ cmake perl XMLLibXML XMLLibXSLT fakegit ]; # we can't use native Lua; upstream uses private headers diff --git a/pkgs/games/dwarf-fortress/unfuck.nix b/pkgs/games/dwarf-fortress/unfuck.nix index 1d6ea1196da..5b2327c2ff5 100644 --- a/pkgs/games/dwarf-fortress/unfuck.nix +++ b/pkgs/games/dwarf-fortress/unfuck.nix @@ -13,6 +13,8 @@ stdenv.mkDerivation { sha256 = "12bqh3k4wsk1c0bz2zly8h0ilbsdmsbwr9cdjc6i7liwg9906g7i"; }; + postPatch = "sed '1i#include ' -i g_src/ttf_manager.cpp"; + cmakeFlags = [ "-DGTK2_GLIBCONFIG_INCLUDE_DIR=${glib.out}/lib/glib-2.0/include" "-DGTK2_GDKCONFIG_INCLUDE_DIR=${gtk2.out}/lib/gtk-2.0/include" diff --git a/pkgs/games/openspades/default.nix b/pkgs/games/openspades/default.nix index 2203bb6337e..d263be3ec11 100644 --- a/pkgs/games/openspades/default.nix +++ b/pkgs/games/openspades/default.nix @@ -16,7 +16,10 @@ stdenv.mkDerivation rec { postPatch = '' substituteInPlace Sources/Client/Client_Input.cpp --replace "isnan(" "std::isnan(" substituteInPlace Sources/Client/Corpse.cpp --replace "isnan(" "std::isnan(" - substituteInPlace Sources/Draw/SWMapRenderer.cpp --replace "isnan(" "std::isnan(" --replace "isinf(" "std::isinf(" + substituteInPlace Sources/Draw/SWMapRenderer.cpp \ + --replace "isnan(" "std::isnan(" --replace "isinf(" "std::isinf(" + sed '1i#include ' -i Sources/Client/{Player,Client_Input,Corpse}.cpp \ + -i Sources/Draw/SWMapRenderer.cpp ''; nativeBuildInputs = diff --git a/pkgs/games/openspades/git.nix b/pkgs/games/openspades/git.nix index 8212f160cda..7d76573f734 100644 --- a/pkgs/games/openspades/git.nix +++ b/pkgs/games/openspades/git.nix @@ -14,6 +14,8 @@ stdenv.mkDerivation rec { sha256 = "0vyvmgim03q8pcmfa1i0njr4w1lpjq5g3b47f67v9b5c5jcjycwn"; }; + postPatch = "sed '1i#include ' -i Sources/Client/{,Client}Player.cpp"; + nativeBuildInputs = with stdenv.lib; [ cmake curl glew makeWrapper mesa SDL2 SDL2_image unzip wget zlib ] diff --git a/pkgs/games/the-butterfly-effect/default.nix b/pkgs/games/the-butterfly-effect/default.nix index 8775fb103d8..cf587ce89dd 100644 --- a/pkgs/games/the-butterfly-effect/default.nix +++ b/pkgs/games/the-butterfly-effect/default.nix @@ -9,8 +9,12 @@ stdenv.mkDerivation rec { sha256 = "1cs4q9qiakfd2m1lvfsvfgf8yvhxzmc06glng5d80piwyn6ymzxg"; }; + postPatch = "sed '1i#include ' -i src/model/World.h"; + buildInputs = [ qt4 box2d which cmake ]; + enableParallelBuilding = true; + installPhase = '' make DESTDIR=.. install mkdir -p $out/bin diff --git a/pkgs/misc/emulators/higan/default.nix b/pkgs/misc/emulators/higan/default.nix index 1395e3ac3ef..77392913cb1 100644 --- a/pkgs/misc/emulators/higan/default.nix +++ b/pkgs/misc/emulators/higan/default.nix @@ -21,6 +21,7 @@ stdenv.mkDerivation rec { }; patches = [ ./0001-change-flags.diff ]; + postPatch = "sed '1i#include ' -i higan/fc/ppu/ppu.cpp"; buildInputs = [ p7zip pkgconfig libX11 libXv udev mesa SDL libao openal libpulseaudio gtk gtksourceview ]; diff --git a/pkgs/misc/emulators/pcsx2/default.nix b/pkgs/misc/emulators/pcsx2/default.nix index 1b95bca643c..673e4c3ed08 100644 --- a/pkgs/misc/emulators/pcsx2/default.nix +++ b/pkgs/misc/emulators/pcsx2/default.nix @@ -15,6 +15,8 @@ stdenv.mkDerivation rec { sha256 = "0s7mxq2cgzwjfsq0vhpz6ljk7wr725nxg48128iyirf85585l691"; }; + postPatch = "sed '1i#include \"x86intrin.h\"' -i common/src/x86emitter/cpudetect.cpp"; + configurePhase = '' mkdir -p build cd build @@ -50,6 +52,8 @@ stdenv.mkDerivation rec { soundtouch wxGTK30 zlib ]; + enableParallelBuilding = true; + meta = with stdenv.lib; { description = "Playstation 2 emulator"; longDescription= '' diff --git a/pkgs/os-specific/linux/sysdig/default.nix b/pkgs/os-specific/linux/sysdig/default.nix index 8296ec62c5b..82e088b76c2 100644 --- a/pkgs/os-specific/linux/sysdig/default.nix +++ b/pkgs/os-specific/linux/sysdig/default.nix @@ -18,6 +18,9 @@ stdenv.mkDerivation { src = fetchurl { inherit (s) url sha256; }; + postPatch = '' + sed '1i#include ' -i userspace/libsinsp/{cursesspectro,filterchecks}.cpp + ''; cmakeFlags = [ "-DUSE_BUNDLED_DEPS=OFF" From a02e5ad9263e508b4df6a3e5841e95bace0e787b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Sun, 19 Jun 2016 10:40:07 +0200 Subject: [PATCH 25/28] virtualbox: fix build with gcc-5.4 by Debian patch --- pkgs/applications/virtualization/virtualbox/default.nix | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/virtualization/virtualbox/default.nix b/pkgs/applications/virtualization/virtualbox/default.nix index df7b555e048..ebdac411b11 100644 --- a/pkgs/applications/virtualization/virtualbox/default.nix +++ b/pkgs/applications/virtualization/virtualbox/default.nix @@ -97,7 +97,14 @@ in stdenv.mkDerivation { 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 = '' sed -i -e 's|/sbin/ifconfig|${nettools}/bin/ifconfig|' \ From 61b8d27b4ce60b18778505d0ca26fdaaf5a5745a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Sun, 19 Jun 2016 13:38:46 +0200 Subject: [PATCH 26/28] make-wrapper: fixup #14753 changes to make tests work The tests need to expand passed variable and very carefully. I could see no other easy way than to change single-quoting in makeWrapper to double-quoting. The tests now fail with the same problem as on master... --- nixos/lib/testing.nix | 8 ++++---- pkgs/build-support/setup-hooks/make-wrapper.sh | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/nixos/lib/testing.nix b/nixos/lib/testing.nix index f7159634e4f..5f463c09284 100644 --- a/nixos/lib/testing.nix +++ b/nixos/lib/testing.nix @@ -113,14 +113,14 @@ rec { --add-flags "$vms" \ ${lib.optionalString enableOCR "--prefix PATH : '${ocrProg}/bin'"} \ --run "testScript=\"\$(cat $out/test-script)\"" \ - --set testScript '"$testScript"' \ - --set VLANS '"${toString vlans}"' + --set testScript '$testScript' \ + --set VLANS '${toString vlans}' ln -s ${testDriver}/bin/nixos-test-driver $out/bin/nixos-run-vms wrapProgram $out/bin/nixos-run-vms \ --add-flags "$vms" \ ${lib.optionalString enableOCR "--prefix PATH : '${ocrProg}/bin'"} \ - --set tests '"startAll; joinAll;"' \ - --set VLANS '"${toString vlans}"' \ + --set tests 'startAll; joinAll;' \ + --set VLANS '${toString vlans}' \ ${lib.optionalString (builtins.length vms == 1) "--set USE_SERIAL 1"} ''; # " diff --git a/pkgs/build-support/setup-hooks/make-wrapper.sh b/pkgs/build-support/setup-hooks/make-wrapper.sh index d3db0b64bd5..d922db5ccf5 100644 --- a/pkgs/build-support/setup-hooks/make-wrapper.sh +++ b/pkgs/build-support/setup-hooks/make-wrapper.sh @@ -16,7 +16,7 @@ makeWrapper() { varName=${params[$((n + 1))]} value=${params[$((n + 2))]} n=$((n + 2)) - echo "export $varName='$value'" >> $wrapper + echo "export $varName=\"$value\"" >> $wrapper fi if test "$p" = "--unset"; then From 429fdbcd6314cbf7c8e4e47be50ef07986ac1c3c Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Sun, 19 Jun 2016 15:15:33 +0100 Subject: [PATCH 27/28] libxkbcommon: set X11 locale directory (close #16340) --- pkgs/development/libraries/libxkbcommon/default.nix | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/pkgs/development/libraries/libxkbcommon/default.nix b/pkgs/development/libraries/libxkbcommon/default.nix index 7cfccfe05f7..7087142a2aa 100644 --- a/pkgs/development/libraries/libxkbcommon/default.nix +++ b/pkgs/development/libraries/libxkbcommon/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, pkgconfig, yacc, flex, xkeyboard_config, libxcb }: +{ stdenv, fetchurl, pkgconfig, yacc, flex, xkeyboard_config, libxcb, libX11 }: stdenv.mkDerivation rec { name = "libxkbcommon-0.6.1"; @@ -12,9 +12,10 @@ stdenv.mkDerivation rec { buildInputs = [ pkgconfig yacc flex xkeyboard_config libxcb ]; - configureFlags = '' - --with-xkb-config-root=${xkeyboard_config}/etc/X11/xkb - ''; + configureFlags = [ + "--with-xkb-config-root=${xkeyboard_config}/etc/X11/xkb" + "--with-x-locale-root=${libX11.out}/share/X11/locale" + ]; preBuild = stdenv.lib.optionalString stdenv.isDarwin '' sed -i 's/,--version-script=.*$//' Makefile From ebf1cb28a2a9e4ef3bcdf15376af4618a1e652c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Wed, 22 Jun 2016 10:45:47 +0200 Subject: [PATCH 28/28] openspades, arangodb: more #include error fixups ... after gcc-5.4. --- pkgs/games/openspades/default.nix | 1 + pkgs/servers/nosql/arangodb/default.nix | 13 +++++++------ 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/pkgs/games/openspades/default.nix b/pkgs/games/openspades/default.nix index d263be3ec11..143fa21ce2e 100644 --- a/pkgs/games/openspades/default.nix +++ b/pkgs/games/openspades/default.nix @@ -20,6 +20,7 @@ stdenv.mkDerivation rec { --replace "isnan(" "std::isnan(" --replace "isinf(" "std::isinf(" sed '1i#include ' -i Sources/Client/{Player,Client_Input,Corpse}.cpp \ -i Sources/Draw/SWMapRenderer.cpp + sed '1i#include ' -i Sources/Draw/SWFeatureLevel.h ''; nativeBuildInputs = diff --git a/pkgs/servers/nosql/arangodb/default.nix b/pkgs/servers/nosql/arangodb/default.nix index ffcd507653a..8b8d1ba0ae1 100644 --- a/pkgs/servers/nosql/arangodb/default.nix +++ b/pkgs/servers/nosql/arangodb/default.nix @@ -11,6 +11,13 @@ stdenv.mkDerivation rec { 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 ' -i arangod/Aql/Functions.cpp \ + -i lib/Basics/string-buffer.cpp + ''; + buildInputs = [ openssl zlib python gyp go readline ]; @@ -19,12 +26,6 @@ stdenv.mkDerivation rec { 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; meta = with stdenv.lib; {