mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-25 16:33:15 +00:00
571c71e6f7
We are migrating packages that meet below requirements: 1. using `callPackage` 2. called path is a directory 3. overriding set is empty (`{ }`) 4. not containing path expressions other than relative path (to makenixpkgs-vet happy) 5. not referenced by nix files outside of the directory, other than`pkgs/top-level/all-packages.nix` 6. not referencing nix files outside of the directory 7. not referencing `default.nix` (since it's changed to `package.nix`) 8. `outPath` doesn't change after migration The tool is here: https://github.com/Aleksanaa/by-name-migrate.
57 lines
1.7 KiB
Nix
57 lines
1.7 KiB
Nix
{ stdenv, lib, fetchurl, gnum4, gitUpdater }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "adns";
|
|
version = "1.6.1";
|
|
|
|
src = fetchurl {
|
|
urls = [
|
|
"https://www.chiark.greenend.org.uk/~ian/adns/ftp/adns-${version}.tar.gz"
|
|
"mirror://gnu/adns/adns-${version}.tar.gz"
|
|
];
|
|
hash = "sha256-cTizeJt1Br1oP0UdT32FMHepGAO3s12G7GZ/D5zUAc0=";
|
|
};
|
|
|
|
nativeBuildInputs = [ gnum4 ];
|
|
|
|
configureFlags = lib.optional stdenv.hostPlatform.isStatic "--disable-dynamic";
|
|
|
|
preConfigure =
|
|
lib.optionalString stdenv.hostPlatform.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;
|
|
|
|
# https://www.mail-archive.com/nix-dev@cs.uu.nl/msg01347.html for details.
|
|
doCheck = false;
|
|
|
|
postInstall = let suffix = lib.versions.majorMinor version;
|
|
in lib.optionalString stdenv.hostPlatform.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.hostPlatform.isDarwin;
|
|
installCheckPhase = ''
|
|
set -eo pipefail
|
|
|
|
for prog in $out/bin/*; do
|
|
$prog --help > /dev/null && echo $(basename $prog) shows usage
|
|
done
|
|
'';
|
|
|
|
passthru.updateScript = gitUpdater {
|
|
url = "https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/githttp/adns.git";
|
|
rev-prefix = "adns-";
|
|
};
|
|
|
|
meta = with lib; {
|
|
homepage = "http://www.chiark.greenend.org.uk/~ian/adns/";
|
|
description = "Asynchronous DNS Resolver Library";
|
|
license = licenses.lgpl2;
|
|
|
|
platforms = platforms.unix;
|
|
};
|
|
}
|