nixpkgs/pkgs/development/libraries/adns/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

53 lines
1.6 KiB
Nix
Raw Normal View History

2020-07-07 22:36:58 +00:00
{ stdenv, lib, fetchurl, gnum4 }:
2020-07-07 22:36:58 +00:00
stdenv.mkDerivation rec {
2019-08-13 21:52:01 +00:00
pname = "adns";
2020-07-07 22:36:58 +00:00
version = "1.6.0";
src = fetchurl {
urls = [
"https://www.chiark.greenend.org.uk/~ian/adns/ftp/adns-${version}.tar.gz"
"ftp://ftp.chiark.greenend.org.uk/users/ian/adns/adns-${version}.tar.gz"
"mirror://gnu/adns/adns-${version}.tar.gz"
];
2020-07-07 22:36:58 +00:00
sha256 = "1pi0xl07pav4zm2jrbrfpv43s1r1q1y12awgak8k7q41m5jp4hpv";
};
2020-07-07 22:36:58 +00:00
nativeBuildInputs = [ gnum4 ];
2021-11-19 06:06:27 +00:00
configureFlags = lib.optional stdenv.hostPlatform.isStatic "--disable-dynamic";
preConfigure =
2020-07-07 22:36:58 +00:00
lib.optionalString stdenv.isDarwin "sed -i -e 's|-Wl,-soname=$(SHLIBSONAME)||' configure";
# Autogenerated headers miss interdependencies in Makefile, fail parallel build:
# https://debbugs.gnu.org/cgi/bugreport.cgi?bug=51329
enableParallelBuilding = false;
2018-11-30 01:19:05 +00:00
# https://www.mail-archive.com/nix-dev@cs.uu.nl/msg01347.html for details.
doCheck = false;
2020-07-07 22:36:58 +00:00
postInstall = let suffix = lib.versions.majorMinor version;
in lib.optionalString stdenv.isDarwin ''
install_name_tool -id $out/lib/libadns.so.${suffix} $out/lib/libadns.so.${suffix}
'';
# darwin executables fail, but I don't want to fail the 100-500 packages depending on this lib
doInstallCheck = !stdenv.isDarwin;
installCheckPhase = ''
set -eo pipefail
for prog in $out/bin/*; do
$prog --help > /dev/null && echo $(basename $prog) shows usage
done
'';
2020-07-07 22:36:58 +00:00
meta = with lib; {
homepage = "http://www.chiark.greenend.org.uk/~ian/adns/";
description = "Asynchronous DNS Resolver Library";
2020-07-07 22:36:58 +00:00
license = licenses.lgpl2;
2020-07-07 22:36:58 +00:00
platforms = platforms.unix;
};
}