@@ -1,29 +1,14 @@
1−{ stdenv, fetchurl, fetchpatch, openssl, perl, which, dns-root-data }:
1+{ stdenv, fetchurl, openssl, perl, which, dns-root-data }:
22
33stdenv.mkDerivation rec {
44 pname = "ldns";
5− version = "1.7.0";
5+ version = "1.7.1";
66
77 src = fetchurl {
88 url = "https://www.nlnetlabs.nl/downloads/ldns/${pname}-${version}.tar.gz";
9− sha256 = "1k56jw4hz8njspfxcfw0czf1smg0n48ylia89ziwyx5k9wdmp7y1";
9+ sha256 = "0ac242n7996fswq1a3nlh1bbbhrsdwsq4mx7xq8ffq6aplb4rj4a";
1010 };
1111
12− patches = [
13− (fetchpatch {
14− name = "CVE-2017-1000231.patch";
15− url = "https://git.nlnetlabs.nl/ldns/patch/?id=c8391790";
16− sha256 = "1rprfh0y1c28dqiy3vgwvwdhn7b5rsylfzzblx5xdhwfqgdw8vn0";
17− excludes = [ "Changelog" ];
18− })
19− (fetchpatch {
20− name = "CVE-2017-1000232.patch";
21− url = "https://git.nlnetlabs.nl/ldns/patch/?id=3bdeed02";
22− sha256 = "0bv0s5jjp0sswfg8da47d346iwp9yjhj9w7fa3bxh174br0zj07r";
23− excludes = [ "Changelog" ];
24− })
25− ];
26−
2712 postPatch = ''
2813 patchShebangs doc/doxyparse.pl
2914 '';
@@ -38,6 +23,7 @@ stdenv.mkDerivation rec {
3823 "--with-trust-anchor=${dns-root-data}/root.key"
3924 "--with-drill"
4025 "--disable-gost"
26+ "--with-examples"
4127 ] ++ stdenv.lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
4228 "ac_cv_func_malloc_0_nonnull=yes"
4329 "ac_cv_func_realloc_0_nonnull=yes"
@@ -47,16 +33,11 @@ stdenv.mkDerivation rec {
4733 doCheck = false; # fails. missing some files
4834
4935 postInstall = ''
36+ # Only 'drill' stays in $out
37+ # the rest are examples:
38+ moveToOutput "bin/ldns*" "$examples"
39+ # with exception of ldns-config, which goes to $dev:
5040 moveToOutput "bin/ldns-config" "$dev"
51−
52− pushd examples
53− configureFlagsArray+=( "--bindir=$examples/bin" )
54− configurePhase
55− make
56− make install
57− popd
58−
59− sed -i "$out/lib/libldns.la" -e "s,-L${openssl.dev},-L${openssl.out},g"
6041 '';
6142
6243 meta = with stdenv.lib; {