2020-07-08 00:36:58 +02:00
|
|
|
{ stdenv, lib, fetchurl, gnum4 }:
|
2008-06-18 23:29:42 +02:00
|
|
|
|
2020-07-08 00:36:58 +02:00
|
|
|
stdenv.mkDerivation rec {
|
2019-08-13 23:52:01 +02:00
|
|
|
pname = "adns";
|
2020-07-08 00:36:58 +02:00
|
|
|
version = "1.6.0";
|
2011-07-21 22:58:34 +02:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
urls = [
|
2018-06-28 20:43:35 +02:00
|
|
|
"https://www.chiark.greenend.org.uk/~ian/adns/ftp/adns-${version}.tar.gz"
|
2011-07-21 22:58:34 +02:00
|
|
|
"ftp://ftp.chiark.greenend.org.uk/users/ian/adns/adns-${version}.tar.gz"
|
|
|
|
"mirror://gnu/adns/adns-${version}.tar.gz"
|
|
|
|
];
|
2020-07-08 00:36:58 +02:00
|
|
|
sha256 = "1pi0xl07pav4zm2jrbrfpv43s1r1q1y12awgak8k7q41m5jp4hpv";
|
2008-06-18 23:29:42 +02:00
|
|
|
};
|
2009-01-17 21:19:54 +01:00
|
|
|
|
2020-07-08 00:36:58 +02:00
|
|
|
nativeBuildInputs = [ gnum4 ];
|
|
|
|
|
2011-07-21 23:26:21 +02:00
|
|
|
preConfigure =
|
2020-07-08 00:36:58 +02:00
|
|
|
lib.optionalString stdenv.isDarwin "sed -i -e 's|-Wl,-soname=$(SHLIBSONAME)||' configure";
|
2011-07-21 23:26:21 +02:00
|
|
|
|
2018-11-30 02:19:05 +01:00
|
|
|
# https://www.mail-archive.com/nix-dev@cs.uu.nl/msg01347.html for details.
|
2009-01-17 21:19:54 +01:00
|
|
|
doCheck = false;
|
2008-06-18 23:29:42 +02:00
|
|
|
|
2020-07-08 00:36:58 +02: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
|
2015-01-02 21:43:51 +01:00
|
|
|
'';
|
|
|
|
|
2020-07-08 00:36:58 +02:00
|
|
|
meta = with lib; {
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "http://www.chiark.greenend.org.uk/~ian/adns/";
|
2011-07-21 22:58:34 +02:00
|
|
|
description = "Asynchronous DNS Resolver Library";
|
2020-07-08 00:36:58 +02:00
|
|
|
license = licenses.lgpl2;
|
2011-07-21 22:58:34 +02:00
|
|
|
|
2020-07-08 00:36:58 +02:00
|
|
|
platforms = platforms.unix;
|
|
|
|
maintainers = [ maintainers.peti ];
|
2011-07-21 22:58:34 +02:00
|
|
|
};
|
2008-06-18 23:29:42 +02:00
|
|
|
}
|