diff --git a/pkgs/build-support/trivial-builders.nix b/pkgs/build-support/trivial-builders.nix index 78e671e8d229..7e73f98db782 100644 --- a/pkgs/build-support/trivial-builders.nix +++ b/pkgs/build-support/trivial-builders.nix @@ -20,13 +20,18 @@ rec { }: runCommand name { inherit text executable; + passAsFile = [ "text" ]; # Pointless to do this on a remote machine. preferLocalBuild = true; } '' n=$out${destination} mkdir -p "$(dirname "$n")" - echo -n "$text" > "$n" + if [ -e "$textPath" ]; then + mv "$textPath" "$n" + else + echo -n "$text" > "$n" + fi (test -n "$executable" && chmod +x "$n") || true ''; diff --git a/pkgs/development/libraries/glibc/nix-locale-archive.patch b/pkgs/development/libraries/glibc/nix-locale-archive.patch index 88c8adef9226..eeaf21901a39 100644 --- a/pkgs/development/libraries/glibc/nix-locale-archive.patch +++ b/pkgs/development/libraries/glibc/nix-locale-archive.patch @@ -6,7 +6,7 @@ diff -ru glibc-2.16.0-orig/locale/loadarchive.c glibc-2.16.0/locale/loadarchive. +static int -+open_locale_archive () ++open_locale_archive (void) +{ + int fd = -1; + char *path = getenv ("LOCALE_ARCHIVE_2_11"); diff --git a/pkgs/development/libraries/ncurses/default.nix b/pkgs/development/libraries/ncurses/default.nix index 43fca875f58f..4409dfc4eca7 100644 --- a/pkgs/development/libraries/ncurses/default.nix +++ b/pkgs/development/libraries/ncurses/default.nix @@ -85,16 +85,16 @@ stdenv.mkDerivation rec { libs="$(find $out/lib -name \*w.a | sed 's,.*lib\(.*\)w.a.*,\1,g')" for lib in $libs; do if [ -e "$out/lib/lib''${lib}w.so" ]; then - echo "INPUT(-l''${lib}w)" > $out/lib/lib$lib.so + ln -svf lib''${lib}w.so $out/lib/lib$lib.so + ln -svf lib''${lib}w.so.${abiVersion} $out/lib/lib$lib.so.${abiVersion} fi ln -svf lib''${lib}w.a $out/lib/lib$lib.a ln -svf ''${lib}w.pc $out/lib/pkgconfig/$lib.pc done # Create curses compatability - echo "INPUT(-lncursesw)" > $out/lib/libcursesw.so - echo "INPUT(-lncursesw)" > $out/lib/libcurses.so - ln -svf libncurses + ln -svf libncursesw.so $out/lib/libcursesw.so + ln -svf libncursesw.so $out/lib/libcurses.so '' else '' # Create a non-abi versioned config cfg=$(basename $out/bin/ncurses*-config) @@ -104,7 +104,7 @@ stdenv.mkDerivation rec { ln -svf . $out/include/ncurses # Create curses compatability - echo "INPUT(-lncurses)" > $out/lib/libcurses.so + ln -svf libncurses.so $out/lib/libcurses.so ''; meta = { diff --git a/pkgs/tools/text/gawk/default.nix b/pkgs/tools/text/gawk/default.nix index 9017025477b3..35e0b6d927b2 100644 --- a/pkgs/tools/text/gawk/default.nix +++ b/pkgs/tools/text/gawk/default.nix @@ -1,11 +1,11 @@ { stdenv, fetchurl, libsigsegv, readline, readlineSupport ? false }: stdenv.mkDerivation rec { - name = "gawk-4.1.2"; + name = "gawk-4.1.3"; src = fetchurl { url = "mirror://gnu/gawk/${name}.tar.xz"; - sha256 = "10glh5amry76v8fzhp4phi4119zwjwzjg9ybzq971qjfhg2m72za"; + sha256 = "09d6pmx6h3i2glafm0jd1v1iyrs03vcyv2rkz12jisii3vlmbkz3"; }; doCheck = !stdenv.isCygwin; # XXX: `test-dup2' segfaults on Cygwin 6.1