bash: fix cygwin build

This commit is contained in:
David McFarland
2017-06-26 09:33:03 -03:00
parent 18125e6f50
commit af165175da
3 changed files with 616 additions and 1396 deletions
+9 -3
View File
@@ -23,7 +23,7 @@ let
in
import ./bash-4.4-patches.nix patch;
inherit (stdenv.lib) optional optionals;
inherit (stdenv.lib) optional optionals optionalString;
in
stdenv.mkDerivation rec {
@@ -52,8 +52,9 @@ stdenv.mkDerivation rec {
patchFlags = "-p0";
patches = upstreamPatches
++ optional hostPlatform.isCygwin ./cygwin-bash-4.3.33-1.src.patch;
patches = upstreamPatches;
postPatch = optionalString hostPlatform.isCygwin "patch -p2 < ${./cygwin-bash-4.4.11-2.src.patch}";
configureFlags = [
(if interactive then "--with-installed-readline" else "--disable-readline")
@@ -79,6 +80,11 @@ stdenv.mkDerivation rec {
# build `version.h'.
enableParallelBuilding = false;
makeFlags = optional hostPlatform.isCygwin [
"LOCAL_LDFLAGS=-Wl,--export-all,--out-implib,libbash.dll.a"
"SHOBJ_LIBS=-lbash"
];
postInstall = ''
ln -s bash "$out/bin/sh"
rm $out/lib/bash/Makefile.inc