2021-01-11 08:54:33 +01:00
|
|
|
{ lib, stdenv, fetchurl, openldap }:
|
2018-07-06 08:51:24 +02:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "adtool";
|
2018-07-06 08:51:24 +02:00
|
|
|
version = "1.3.3";
|
|
|
|
|
|
|
|
src = fetchurl {
|
2019-08-15 14:41:18 +02:00
|
|
|
url = "https://gp2x.org/adtool/${pname}-${version}.tar.gz";
|
2018-07-06 08:51:24 +02:00
|
|
|
sha256 = "1awmpjamrwivi69i0j2fyrziy9s096ckviqd9c4llc3990mfsn4n";
|
|
|
|
};
|
|
|
|
|
|
|
|
configureFlags = [
|
|
|
|
"--sysconfdir=/etc"
|
|
|
|
];
|
|
|
|
|
|
|
|
installFlags = [
|
|
|
|
"sysconfdir=$(out)/etc"
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [ openldap ];
|
|
|
|
|
2022-05-19 15:58:12 +02:00
|
|
|
# Workaround build failure on -fno-common toolchains like upstream
|
|
|
|
# gcc-10. Otherwise build fails as:
|
|
|
|
# ld: ../../src/lib/libactive_directory.a(active_directory.o):/build/adtool-1.3.3/src/lib/active_directory.h:31:
|
|
|
|
# multiple definition of `system_config_file'; adtool.o:/build/adtool-1.3.3/src/tools/../../src/lib/active_directory.h:31: first defined here
|
|
|
|
NIX_CFLAGS_COMPILE = "-fcommon";
|
|
|
|
|
2018-07-06 08:51:24 +02:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
mkdir -p $out/share/doc/adtool
|
|
|
|
mv $out/etc/* $out/share/doc/adtool
|
|
|
|
rmdir $out/etc
|
|
|
|
'';
|
|
|
|
|
|
|
|
# It requires an LDAP server for tests
|
|
|
|
doCheck = false;
|
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2018-07-06 08:51:24 +02:00
|
|
|
description = "Active Directory administration utility for Unix";
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "https://gp2x.org/adtool";
|
2018-07-06 08:51:24 +02:00
|
|
|
license = licenses.gpl2;
|
|
|
|
maintainers = with maintainers; [ peterhoeg ];
|
2022-05-23 16:22:32 +02:00
|
|
|
broken = true; # does not link against recent libldap versions and unmaintained since 2017
|
2018-07-06 08:51:24 +02:00
|
|
|
};
|
|
|
|
}
|