unbound: 1.18.0 -> 1.19.0

- switch to finalAttrs
- remove the patch from upstream
This commit is contained in:
Ashish SHUKLA 2023-11-08 17:29:29 +01:00
parent b771463848
commit ebb42ada24
No known key found for this signature in database

View File

@ -47,24 +47,15 @@
, gnutls
}:
stdenv.mkDerivation rec {
stdenv.mkDerivation (finalAttrs: {
pname = "unbound";
version = "1.18.0";
version = "1.19.0";
src = fetchurl {
url = "https://nlnetlabs.nl/downloads/unbound/unbound-${version}.tar.gz";
hash = "sha256-PalUkKhc/2Qg8m+uC4Skn1ES3xvxt/w0+HJPAggstxI=";
url = "https://nlnetlabs.nl/downloads/unbound/unbound-${finalAttrs.version}.tar.gz";
hash = "sha256-qXUyRohUxhwt5IykFw3oVP07yVyAQ7sM+w/iZgWWZiQ=";
};
patches = [
# Backport: fix libunbound with nettle.
(fetchpatch {
url = "https://github.com/NLnetLabs/unbound/commit/654a7eab62cbd1844d483cc4a0f2cf2fbcbaf00a.patch";
excludes = [ "doc/Changelog" ];
hash = "sha256-n3FCeZESFrrn6Wcf28Hb8WZs1eMHWjbsf2WCFOXU3lI=";
})
];
outputs = [ "out" "lib" "man" ]; # "dev" would only split ~20 kB
nativeBuildInputs = [ makeWrapper pkg-config ]
@ -157,7 +148,7 @@ stdenv.mkDerivation rec {
+ ''substituteInPlace "$lib/lib/libunbound.la" ''
+ lib.concatMapStrings
(pkg: lib.optionalString (pkg ? dev) " --replace '-L${pkg.dev}/lib' '-L${pkg.out}/lib' --replace '-R${pkg.dev}/lib' '-R${pkg.out}/lib'")
(builtins.filter (p: p != null) buildInputs);
(builtins.filter (p: p != null) finalAttrs.buildInputs);
passthru.tests = {
inherit gnutls;
@ -172,4 +163,4 @@ stdenv.mkDerivation rec {
maintainers = with maintainers; [ ajs124 ];
platforms = platforms.unix;
};
}
})