Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib, stdenv, fetchurl, openldap }: 2 3stdenv.mkDerivation rec { 4 pname = "adtool"; 5 version = "1.3.3"; 6 7 src = fetchurl { 8 url = "https://gp2x.org/adtool/${pname}-${version}.tar.gz"; 9 sha256 = "1awmpjamrwivi69i0j2fyrziy9s096ckviqd9c4llc3990mfsn4n"; 10 }; 11 12 configureFlags = [ 13 "--sysconfdir=/etc" 14 ]; 15 16 installFlags = [ 17 "sysconfdir=$(out)/etc" 18 ]; 19 20 buildInputs = [ openldap ]; 21 22 # Workaround build failure on -fno-common toolchains like upstream 23 # gcc-10. Otherwise build fails as: 24 # ld: ../../src/lib/libactive_directory.a(active_directory.o):/build/adtool-1.3.3/src/lib/active_directory.h:31: 25 # multiple definition of `system_config_file'; adtool.o:/build/adtool-1.3.3/src/tools/../../src/lib/active_directory.h:31: first defined here 26 env.NIX_CFLAGS_COMPILE = "-fcommon"; 27 28 enableParallelBuilding = true; 29 30 postInstall = '' 31 mkdir -p $out/share/doc/adtool 32 mv $out/etc/* $out/share/doc/adtool 33 rmdir $out/etc 34 ''; 35 36 # It requires an LDAP server for tests 37 doCheck = false; 38 39 meta = with lib; { 40 description = "Active Directory administration utility for Unix"; 41 homepage = "https://gp2x.org/adtool"; 42 license = licenses.gpl2; 43 maintainers = with maintainers; [ peterhoeg ]; 44 broken = true; # does not link against recent libldap versions and unmaintained since 2017 45 }; 46}