From 1660098d8425a190d42d5604afb54354625392b8 Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Wed, 17 Oct 2018 14:44:35 -0500 Subject: [PATCH] curl: build statically on windows --- pkgs/tools/networking/curl/7_59.nix | 6 +++++- pkgs/tools/networking/curl/default.nix | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) 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";