git.iko.soy/typeable/nixpkgs
on master help sign in
knot-dns: yet another attempt to fix build on Darwin
commitdacbca273007fad83a22fc51b33b2350ed7094c0 authorVladimír Čunát <vcunat@gmail.com> dateTue 31 Jan 2017, 12:53 (10 years ago) parent3ccc139
1 file changed+9−2
pkgs/servers/dns/knot-dns/default.nix+9−2
pkgs/servers/dns/knot-dns/default.nix+9−2
@@ -1,5 +1,5 @@
11{ stdenv, fetchurl, pkgconfig, gnutls, jansson, liburcu, lmdb, libcap_ng, libidn
2−, systemd, nettle, libedit, zlib, libiconv
2+, systemd, nettle, libedit, zlib, libiconv, fetchpatch
33}:
44
55# Note: ATM only the libraries have been tested in nixpkgs.
@@ -12,6 +12,13 @@ stdenv.mkDerivation rec {
1212 sha256 = "0y9nhp9lfmxv4iy1xg7l4lfxv4168qhag26wwg0dbi0zjpkd790b";
1313 };
1414
15+ patches = stdenv.lib.optional stdenv.isDarwin
16+ (fetchpatch {
17+ name = "before-sierra.diff";
18+ url = "https://gitlab.labs.nic.cz/labs/knot/merge_requests/664.diff";
19+ sha256 = "0g4gm2m3pi0lfpkp53xayf6jq6yn3ifidh40maiy1a46dfadvw6w";
20+ });
21+
1522 outputs = [ "bin" "out" "dev" ];
1623
1724 nativeBuildInputs = [ pkgconfig ];
@@ -27,7 +34,7 @@ stdenv.mkDerivation rec {
2734
2835 enableParallelBuilding = true;
2936
30− CFLAGS = [ "-DNDEBUG" ];
37+ CFLAGS = [ "-O2" "-DNDEBUG" ];
3138
3239 #doCheck = true; problems in combination with dynamic linking
3340