git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #108170 from brano543/openssl_mingw_fix

Openssl mingw fix

commit61a31ad3d6c58cf7cc7c57fb998835c019e458d2 authorJohn Ericson <git@JohnEricson.me> dateMon 26 Apr 2021, 23:48 (6 years ago) parentbb149ebdc9694c
2 files changed+15−14
pkgs/development/libraries/openssl/default.nix+5−3 pkgs/top-level/all-packages.nix+10−11
pkgs/development/libraries/openssl/default.nix+5−3
@@ -6,7 +6,7 @@
66# Used to avoid cross compiling perl, for example, in darwin bootstrap tools.
77# This will cause c_rehash to refer to perl via the environment, but otherwise
88# will produce a perfectly functional openssl binary and library.
9−, withPerl ? true
9+, withPerl ? stdenv.hostPlatform == stdenv.buildPlatform
1010}:
1111
1212assert (
@@ -42,8 +42,10 @@ let
4242 substituteInPlace "$a" \
4343 --replace /bin/rm rm
4444 done
45− '' + optionalString (versionAtLeast version "1.1.1") ''
46− substituteInPlace config --replace '/usr/bin/env' '${coreutils}/bin/env'
45+ ''
46+ # config is a configure script which is not installed.
47+ + optionalString (versionAtLeast version "1.1.1") ''
48+ substituteInPlace config --replace '/usr/bin/env' '${buildPackages.coreutils}/bin/env'
4749 '' + optionalString (versionAtLeast version "1.1.0" && stdenv.hostPlatform.isMusl) ''
4850 substituteInPlace crypto/async/arch/async_posix.h \
4951 --replace '!defined(__ANDROID__) && !defined(__OpenBSD__)' \
pkgs/top-level/all-packages.nix+10−11
@@ -465,16 +465,18 @@ in
465465 perl = buildPackages.perl.override { fetchurl = stdenv.fetchurlBoot; };
466466 openssl = buildPackages.openssl.override {
467467 fetchurl = stdenv.fetchurlBoot;
468− coreutils = buildPackages.coreutils.override {
469− fetchurl = stdenv.fetchurlBoot;
468+ buildPackages = {
469+ coreutils = buildPackages.coreutils.override {
470+ fetchurl = stdenv.fetchurlBoot;
471+ inherit perl;
472+ xz = buildPackages.xz.override { fetchurl = stdenv.fetchurlBoot; };
473+ gmp = null;
474+ aclSupport = false;
475+ attrSupport = false;
476+ };
470477 inherit perl;
471− xz = buildPackages.xz.override { fetchurl = stdenv.fetchurlBoot; };
472− gmp = null;
473− aclSupport = false;
474− attrSupport = false;
475478 };
476479 inherit perl;
477− buildPackages = { inherit perl; };
478480 };
479481 libssh2 = buildPackages.libssh2.override {
480482 fetchurl = stdenv.fetchurlBoot;
@@ -16901,10 +16903,7 @@ in
1690116903
1690216904 wolfssl = callPackage ../development/libraries/wolfssl { };
1690316905
16904− openssl =
16905− if stdenv.hostPlatform.isMinGW # Work around broken cross build
16906− then openssl_1_0_2
16907− else openssl_1_1;
16906+ openssl = openssl_1_1;
1690816907
1690916908 inherit (callPackages ../development/libraries/openssl { })
1691016909 openssl_1_0_2