about summary refs log tree commit diff
path: root/pkgs/tools
diff options
context:
space:
mode:
authorJohn Ericson <git@JohnEricson.me>2018-10-18 15:47:04 -0400
committerGitHub <noreply@github.com>2018-10-18 15:47:04 -0400
commitd97e5e111595831534c37b8b42557d4e8b27417f (patch)
treec96eecf0ae4eb7a98e74b2bfd4192ec17b119e91 /pkgs/tools
parentad250c18f7b84b1dd08c471d7424f79cfaf5dea0 (diff)
parent4a12a9321c567cae8e132c9d9b8b6255d52364d3 (diff)
downloadnixlib-d97e5e111595831534c37b8b42557d4e8b27417f.tar
nixlib-d97e5e111595831534c37b8b42557d4e8b27417f.tar.gz
nixlib-d97e5e111595831534c37b8b42557d4e8b27417f.tar.bz2
nixlib-d97e5e111595831534c37b8b42557d4e8b27417f.tar.lz
nixlib-d97e5e111595831534c37b8b42557d4e8b27417f.tar.xz
nixlib-d97e5e111595831534c37b8b42557d4e8b27417f.tar.zst
nixlib-d97e5e111595831534c37b8b42557d4e8b27417f.zip
Merge pull request #48602 from matthewbauer/cmake-cross
Set CMAKE_SYSTEM_* for cross compiling
Diffstat (limited to 'pkgs/tools')
-rw-r--r--pkgs/tools/compression/brotli/default.nix4
-rw-r--r--pkgs/tools/networking/curl/7_59.nix6
-rw-r--r--pkgs/tools/networking/curl/default.nix6
-rw-r--r--pkgs/tools/text/html-tidy/default.nix3
4 files changed, 12 insertions, 7 deletions
diff --git a/pkgs/tools/compression/brotli/default.nix b/pkgs/tools/compression/brotli/default.nix
index 754c0e581563..7047eeeefa61 100644
--- a/pkgs/tools/compression/brotli/default.nix
+++ b/pkgs/tools/compression/brotli/default.nix
@@ -15,8 +15,7 @@ stdenv.mkDerivation rec {
 
   nativeBuildInputs = [ cmake ];
 
-  cmakeFlags = stdenv.lib.optional
-    (stdenv.hostPlatform.libc == "msvcrt") "-DCMAKE_SYSTEM_NAME=Windows";
+  cmakeFlags = [];
 
   outputs = [ "out" "dev" "lib" ];
 
@@ -59,4 +58,3 @@ stdenv.mkDerivation rec {
     platforms = platforms.all;
   };
 }
-
diff --git a/pkgs/tools/networking/curl/7_59.nix b/pkgs/tools/networking/curl/7_59.nix
index 0482bcf52629..508b357e3fde 100644
--- a/pkgs/tools/networking/curl/7_59.nix
+++ b/pkgs/tools/networking/curl/7_59.nix
@@ -77,7 +77,11 @@ stdenv.mkDerivation rec {
     ++ stdenv.lib.optional gssSupport "--with-gssapi=${kerberos.dev}"
        # For the 'urandom', maybe it should be a cross-system option
     ++ stdenv.lib.optional (stdenv.hostPlatform != stdenv.buildPlatform)
-       "--with-random=/dev/urandom";
+       "--with-random=/dev/urandom"
+    ++ stdenv.lib.optionals stdenv.hostPlatform.isWindows [
+      "--disable-shared"
+      "--enable-static"
+    ];
 
   CXX = "${stdenv.cc.targetPrefix}c++";
   CXXCPP = "${stdenv.cc.targetPrefix}c++ -E";
diff --git a/pkgs/tools/networking/curl/default.nix b/pkgs/tools/networking/curl/default.nix
index dda97d34d869..4af8ff75e210 100644
--- a/pkgs/tools/networking/curl/default.nix
+++ b/pkgs/tools/networking/curl/default.nix
@@ -81,7 +81,11 @@ stdenv.mkDerivation rec {
     ++ stdenv.lib.optional gssSupport "--with-gssapi=${kerberos.dev}"
        # For the 'urandom', maybe it should be a cross-system option
     ++ stdenv.lib.optional (stdenv.hostPlatform != stdenv.buildPlatform)
-       "--with-random=/dev/urandom";
+       "--with-random=/dev/urandom"
+    ++ stdenv.lib.optionals stdenv.hostPlatform.isWindows [
+      "--disable-shared"
+      "--enable-static"
+    ];
 
   CXX = "${stdenv.cc.targetPrefix}c++";
   CXXCPP = "${stdenv.cc.targetPrefix}c++ -E";
diff --git a/pkgs/tools/text/html-tidy/default.nix b/pkgs/tools/text/html-tidy/default.nix
index 51ce4baa0beb..1974c0aa4f36 100644
--- a/pkgs/tools/text/html-tidy/default.nix
+++ b/pkgs/tools/text/html-tidy/default.nix
@@ -13,8 +13,7 @@ stdenv.mkDerivation rec {
 
   nativeBuildInputs = [ cmake libxslt/*manpage*/ ];
 
-  cmakeFlags = stdenv.lib.optional
-    (stdenv.hostPlatform.libc or null == "msvcrt") "-DCMAKE_SYSTEM_NAME=Windows";
+  cmakeFlags = [];
 
   # ATM bin/tidy is statically linked, as upstream provides no other option yet.
   # https://github.com/htacg/tidy-html5/issues/326#issuecomment-160322107