about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMartin Bravenboer <martin.bravenboer@logicblox.com>2006-08-17 01:49:53 +0000
committerMartin Bravenboer <martin.bravenboer@logicblox.com>2006-08-17 01:49:53 +0000
commit77a52729228f0a5657bff191d8a91b0c597910cd (patch)
treea35f2c6061801f7cce1be1c08345085b8cc49377
parent18d81e23fe022ce9a6f36685e2819f12a1840556 (diff)
downloadnixlib-77a52729228f0a5657bff191d8a91b0c597910cd.tar
nixlib-77a52729228f0a5657bff191d8a91b0c597910cd.tar.gz
nixlib-77a52729228f0a5657bff191d8a91b0c597910cd.tar.bz2
nixlib-77a52729228f0a5657bff191d8a91b0c597910cd.tar.lz
nixlib-77a52729228f0a5657bff191d8a91b0c597910cd.tar.xz
nixlib-77a52729228f0a5657bff191d8a91b0c597910cd.tar.zst
nixlib-77a52729228f0a5657bff191d8a91b0c597910cd.zip
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
-rw-r--r--pkgs/stdenv/mingw/default.nix16
-rwxr-xr-xpkgs/stdenv/mingw/fix-builder.sh12
-rwxr-xr-xpkgs/top-level/mingw.nix2
3 files changed, 26 insertions, 4 deletions
diff --git a/pkgs/stdenv/mingw/default.nix b/pkgs/stdenv/mingw/default.nix
index d7caa744730c..69b41aea694e 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 000000000000..76875babd3e0
--- /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 a95e146b003b..2e519a946648 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;
   };
 }