summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorAntonio Nuno Monteiro <anmonteiro@gmail.com>2020-01-16 11:02:38 -0800
committerFrederik Rietdijk <freddyrietdijk@fridh.nl>2020-01-16 20:02:38 +0100
commit4b34c18e310b3012c7c213713d6c27c5df0c2b14 (patch)
treee7bcb867f1d0d459b27891ad6b0b9466c7485a1e /pkgs
parent1177bce848ae759a1fcc9afc2e135adaf41a092a (diff)
downloadnixpkgs-4b34c18e310b3012c7c213713d6c27c5df0c2b14.tar
nixpkgs-4b34c18e310b3012c7c213713d6c27c5df0c2b14.tar.gz
nixpkgs-4b34c18e310b3012c7c213713d6c27c5df0c2b14.tar.bz2
nixpkgs-4b34c18e310b3012c7c213713d6c27c5df0c2b14.tar.lz
nixpkgs-4b34c18e310b3012c7c213713d6c27c5df0c2b14.tar.xz
nixpkgs-4b34c18e310b3012c7c213713d6c27c5df0c2b14.tar.zst
nixpkgs-4b34c18e310b3012c7c213713d6c27c5df0c2b14.zip
pkgsStatic: make OpenSSL 1.1 compile (#77542)
* pkgsStatic: make OpenSSL 1.1 compile
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/development/libraries/openssl/default.nix6
-rw-r--r--pkgs/top-level/static.nix12
2 files changed, 9 insertions, 9 deletions
diff --git a/pkgs/development/libraries/openssl/default.nix b/pkgs/development/libraries/openssl/default.nix
index 0313e02484c..63657cfc5e6 100644
--- a/pkgs/development/libraries/openssl/default.nix
+++ b/pkgs/development/libraries/openssl/default.nix
@@ -72,7 +72,11 @@ let
       "-DHAVE_CRYPTODEV"
       "-DUSE_CRYPTODEV_DIGESTS"
     ] ++ stdenv.lib.optional enableSSL2 "enable-ssl2"
-      ++ stdenv.lib.optional (versionAtLeast version "1.1.0" && stdenv.hostPlatform.isAarch64) "no-afalgeng";
+      ++ stdenv.lib.optional (versionAtLeast version "1.1.0" && stdenv.hostPlatform.isAarch64) "no-afalgeng"
+      # OpenSSL needs a specific `no-shared` configure flag.
+      # See https://wiki.openssl.org/index.php/Compilation_and_Installation#Configure_Options
+      # for a comprehensive list of configuration options.
+      ++ stdenv.lib.optional (versionAtLeast version "1.1.0" && static) "no-shared";
 
     makeFlags = [
       "MANDIR=$(man)/share/man"
diff --git a/pkgs/top-level/static.nix b/pkgs/top-level/static.nix
index da36ffda864..3dd539e03a7 100644
--- a/pkgs/top-level/static.nix
+++ b/pkgs/top-level/static.nix
@@ -161,14 +161,10 @@ in {
   };
   mkl = super.mkl.override { enableStatic = true; };
   nix = super.nix.override { withAWS = false; };
-  # openssl 1.1 doesn't compile
-  openssl = super.openssl_1_0_2.override {
-    static = true;
-
-    # Don’t use new stdenv for openssl because it doesn’t like the
-    # --disable-shared flag
-    stdenv = super.stdenv;
-  };
+  openssl = (super.openssl_1_1.override { static = true; }).overrideAttrs (o: {
+    # OpenSSL doesn't like the `--enable-static` / `--disable-shared` flags.
+    configureFlags = (removeUnknownConfigureFlags o.configureFlags);
+  });
   arrow-cpp = super.arrow-cpp.override {
     enableShared = false;
     python = { pkgs = { python = null; numpy = null; }; };