diff --git a/pkgs/development/libraries/udns/default.nix b/pkgs/development/libraries/udns/default.nix index fc0b4a42b55d..da0554d49e60 100644 --- a/pkgs/development/libraries/udns/default.nix +++ b/pkgs/development/libraries/udns/default.nix @@ -16,7 +16,20 @@ stdenv.mkDerivation rec { sha256 = "0447fv1hmb44nnchdn6p5pd9b44x8p5jn0ahw6crwbqsg7f0hl8i"; }; + # udns uses a very custom build and hardcodes a .so name in a few places. + # Instead of fighting with it to apply the standard dylib script, change + # the right place in the Makefile itself. + postPatch = + if stdenv.isDarwin + then + '' + substituteInPlace Makefile.in \ + --replace --soname, -install_name,$out/lib/ + '' + else ""; + installPhase = '' + runHook preInstall mkdir -p $out/bin mkdir -p $out/include mkdir -p $out/lib @@ -30,6 +43,7 @@ stdenv.mkDerivation rec { ln -rs $out/lib/libudns.so.0 $out/lib/libudns.so cp dnsget.1 rblcheck.1 $out/share/man/man1 cp udns.3 $out/share/man/man3 + runHook postInstall ''; # keep man3 @@ -40,7 +54,7 @@ stdenv.mkDerivation rec { description = "Async-capable DNS stub resolver library"; license = licenses.lgpl21Plus; maintainers = [ maintainers.womfoo ]; - platforms = platforms.linux; + platforms = platforms.unix; }; }