From 77a52729228f0a5657bff191d8a91b0c597910cd Mon Sep 17 00:00:00 2001 From: Martin Bravenboer Date: Thu, 17 Aug 2006 01:49:53 +0000 Subject: [PATCH] Added a fix-builder to fix most of the builder scripts automatically. Basic packages, such as zlib and getopt now build. svn path=/nixpkgs/trunk/; revision=6143 --- pkgs/stdenv/mingw/default.nix | 16 +++++++++++++--- pkgs/stdenv/mingw/fix-builder.sh | 12 ++++++++++++ pkgs/top-level/mingw.nix | 2 +- 3 files changed, 26 insertions(+), 4 deletions(-) create mode 100755 pkgs/stdenv/mingw/fix-builder.sh diff --git a/pkgs/stdenv/mingw/default.nix b/pkgs/stdenv/mingw/default.nix index d7caa744730..69b41aea694 100644 --- a/pkgs/stdenv/mingw/default.nix +++ b/pkgs/stdenv/mingw/default.nix @@ -88,9 +88,19 @@ let { (removeAttrs attrs ["meta"]) // { - builder = if attrs ? realBuilder then attrs.realBuilder else shell; - args = if attrs ? args then attrs.args else - ["-e" (if attrs ? builder then attrs.builder else ./default-builder.sh)]; + builder = + if attrs ? realBuilder then attrs.realBuilder else shell; + args = + if attrs ? args then + attrs.args + else + ["-e" ( + if attrs ? builder then + [./fix-builder.sh attrs.builder] + else + ./default-builder.sh + ) + ]; inherit stdenv system; C_INCLUDE_PATH = mingwRuntimeSrc + "/include" + ":" + w32apiSrc + "/include"; CPLUS_INCLUDE_PATH = mingwRuntimeSrc + "/include" + ":" + w32apiSrc + "/include"; diff --git a/pkgs/stdenv/mingw/fix-builder.sh b/pkgs/stdenv/mingw/fix-builder.sh new file mode 100755 index 00000000000..76875babd3e --- /dev/null +++ b/pkgs/stdenv/mingw/fix-builder.sh @@ -0,0 +1,12 @@ +# Workaround MSYS shell problem +if test -z "$out"; then + stdenv="$STDENV" + out="$OUT" + src="$SRC" + srcs="$SRCS" + buildInputs="$BUILDINPUTS" + propagatedBuildInputs="$PROPAGATEDBUILDINPUTS" + succeedOnFailure="$SUCCEEDONFAILURE" +fi + +source $@ diff --git a/pkgs/top-level/mingw.nix b/pkgs/top-level/mingw.nix index a95e146b003..2e519a94664 100755 --- a/pkgs/top-level/mingw.nix +++ b/pkgs/top-level/mingw.nix @@ -5,6 +5,6 @@ let { }; body = { - inherit (pkgs) zlib; + inherit (pkgs) zlib getopt realCurl; }; }