Merge #23245: break gnutls -> openssl dependency
This commit is contained in:
commit
18bd007714
@ -23,11 +23,21 @@ stdenv.mkDerivation {
|
|||||||
| grep -v '^dh-autoreconf' | sed 's|^|debian/patches/|')"
|
| grep -v '^dh-autoreconf' | sed 's|^|debian/patches/|')"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
outputs = [ "out" "dev" ];
|
# libevent_openssl is moved into its own output, so that openssl isn't present
|
||||||
|
# in the default closure.
|
||||||
|
outputs = [ "out" "dev" "openssl" ];
|
||||||
outputBin = "dev";
|
outputBin = "dev";
|
||||||
|
propagatedBuildOutputs = [ "out" "openssl" ];
|
||||||
|
|
||||||
buildInputs = [ openssl ] ++ stdenv.lib.optional stdenv.isCygwin findutils;
|
buildInputs = [ openssl ] ++ stdenv.lib.optional stdenv.isCygwin findutils;
|
||||||
|
|
||||||
|
postInstall = ''
|
||||||
|
moveToOutput "lib/libevent_openssl*" "$openssl"
|
||||||
|
substituteInPlace "$dev/lib/pkgconfig/libevent_openssl.pc" \
|
||||||
|
--replace "$out" "$openssl"
|
||||||
|
sed "/^libdir=/s|$out|$openssl|" -i "$openssl"/lib/libevent_openssl.la
|
||||||
|
'';
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
description = "Event notification library";
|
description = "Event notification library";
|
||||||
longDescription = ''
|
longDescription = ''
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{ stdenv, fetchurl, openssl, expat, libevent }:
|
{ stdenv, fetchurl, openssl, nettle, expat, libevent }:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "unbound-${version}";
|
name = "unbound-${version}";
|
||||||
@ -11,7 +11,7 @@ stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
outputs = [ "out" "lib" "man" ]; # "dev" would only split ~20 kB
|
outputs = [ "out" "lib" "man" ]; # "dev" would only split ~20 kB
|
||||||
|
|
||||||
buildInputs = [ openssl expat libevent ];
|
buildInputs = [ openssl nettle expat libevent ];
|
||||||
|
|
||||||
configureFlags = [
|
configureFlags = [
|
||||||
"--with-ssl=${openssl.dev}"
|
"--with-ssl=${openssl.dev}"
|
||||||
@ -26,11 +26,20 @@ stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
installFlags = [ "configfile=\${out}/etc/unbound/unbound.conf" ];
|
installFlags = [ "configfile=\${out}/etc/unbound/unbound.conf" ];
|
||||||
|
|
||||||
# get rid of runtime dependencies on $dev outputs
|
preFixup =
|
||||||
postInstall = ''substituteInPlace "$lib/lib/libunbound.la" ''
|
# Build libunbound again, but only against nettle instead of openssl.
|
||||||
|
# This avoids gnutls.out -> unbound.lib -> openssl.out.
|
||||||
|
''
|
||||||
|
configureFlags="$configureFlags --with-nettle=${nettle.dev} --with-libunbound-only"
|
||||||
|
configurePhase
|
||||||
|
buildPhase
|
||||||
|
installPhase
|
||||||
|
''
|
||||||
|
# get rid of runtime dependencies on $dev outputs
|
||||||
|
+ ''substituteInPlace "$lib/lib/libunbound.la" ''
|
||||||
+ stdenv.lib.concatMapStrings
|
+ stdenv.lib.concatMapStrings
|
||||||
(pkg: " --replace '-L${pkg.dev}/lib' '-L${pkg.out}/lib' ")
|
(pkg: " --replace '-L${pkg.dev}/lib' '-L${pkg.out}/lib' ")
|
||||||
[ openssl expat libevent ];
|
buildInputs;
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
description = "Validating, recursive, and caching DNS resolver";
|
description = "Validating, recursive, and caching DNS resolver";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user