diff options
author | David McFarland <corngood@gmail.com> | 2017-05-23 10:36:17 -0300 |
---|---|---|
committer | David McFarland <corngood@gmail.com> | 2017-06-26 09:33:03 -0300 |
commit | af165175da97e6f63c51f30e28a17851fb71f579 (patch) | |
tree | 2806474ad6c00c79b99ef6f9bc68e7a53643bc55 /pkgs/shells/bash/4.4.nix | |
parent | 18125e6f50c77d56ba3f7486590db2bfb55a367b (diff) | |
download | nixlib-af165175da97e6f63c51f30e28a17851fb71f579.tar nixlib-af165175da97e6f63c51f30e28a17851fb71f579.tar.gz nixlib-af165175da97e6f63c51f30e28a17851fb71f579.tar.bz2 nixlib-af165175da97e6f63c51f30e28a17851fb71f579.tar.lz nixlib-af165175da97e6f63c51f30e28a17851fb71f579.tar.xz nixlib-af165175da97e6f63c51f30e28a17851fb71f579.tar.zst nixlib-af165175da97e6f63c51f30e28a17851fb71f579.zip |
bash: fix cygwin build
Diffstat (limited to 'pkgs/shells/bash/4.4.nix')
-rw-r--r-- | pkgs/shells/bash/4.4.nix | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/pkgs/shells/bash/4.4.nix b/pkgs/shells/bash/4.4.nix index e2defc2bf373..dba31e41ca37 100644 --- a/pkgs/shells/bash/4.4.nix +++ b/pkgs/shells/bash/4.4.nix @@ -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 |