2021-01-17 10:17:16 +01:00
|
|
|
{ fetchurl, lib, stdenv, autoreconfHook, pkg-config, perl, python
|
2017-11-09 05:52:23 +01:00
|
|
|
, db, libgcrypt, avahi, libiconv, pam, openssl, acl
|
2020-11-11 21:58:26 +01:00
|
|
|
, ed, libtirpc, libevent
|
2017-11-09 05:52:23 +01:00
|
|
|
}:
|
2013-09-16 07:54:57 +02:00
|
|
|
|
2020-06-07 23:11:08 +02:00
|
|
|
stdenv.mkDerivation rec {
|
2021-08-12 20:49:29 +02:00
|
|
|
pname = "netatalk";
|
|
|
|
version = "3.1.12";
|
2013-09-16 07:54:57 +02:00
|
|
|
|
|
|
|
src = fetchurl {
|
2021-08-12 20:49:29 +02:00
|
|
|
url = "mirror://sourceforge/netatalk/netatalk/netatalk-${version}.tar.bz2";
|
2018-12-25 14:46:49 +01:00
|
|
|
sha256 = "1ld5mnz88ixic21m6f0xcgf8v6qm08j6xabh1dzfj6x47lxghq0m";
|
2013-09-16 07:54:57 +02:00
|
|
|
};
|
|
|
|
|
2017-11-09 05:52:23 +01:00
|
|
|
patches = [
|
|
|
|
./no-suid.patch
|
|
|
|
./omitLocalstatedirCreation.patch
|
|
|
|
];
|
2015-08-14 07:05:03 +02:00
|
|
|
|
2021-01-17 10:17:16 +01:00
|
|
|
nativeBuildInputs = [ autoreconfHook pkg-config perl python python.pkgs.wrapPython ];
|
2017-11-09 05:52:23 +01:00
|
|
|
|
2019-09-13 19:02:18 +02:00
|
|
|
buildInputs = [ db libgcrypt avahi libiconv pam openssl acl libevent ];
|
2013-09-16 07:54:57 +02:00
|
|
|
|
|
|
|
configureFlags = [
|
2018-05-22 15:47:28 +02:00
|
|
|
"--with-bdb=${db.dev}"
|
2017-11-09 05:52:23 +01:00
|
|
|
"--with-ssl-dir=${openssl.dev}"
|
2015-08-14 07:05:03 +02:00
|
|
|
"--with-lockfile=/run/lock/netatalk"
|
2019-09-13 19:02:18 +02:00
|
|
|
"--with-libevent=${libevent.dev}"
|
2015-08-14 07:05:03 +02:00
|
|
|
"--localstatedir=/var/lib"
|
2013-09-16 07:54:57 +02:00
|
|
|
];
|
|
|
|
|
2016-09-02 20:38:03 +02:00
|
|
|
# Expose librpcsvc to the linker for afpd
|
|
|
|
# Fixes errors that showed up when closure-size was merged:
|
|
|
|
# afpd-nfsquota.o: In function `callaurpc':
|
|
|
|
# netatalk-3.1.7/etc/afpd/nfsquota.c:78: undefined reference to `xdr_getquota_args'
|
|
|
|
# netatalk-3.1.7/etc/afpd/nfsquota.c:78: undefined reference to `xdr_getquota_rslt'
|
|
|
|
postConfigure = ''
|
|
|
|
${ed}/bin/ed -v etc/afpd/Makefile << EOF
|
|
|
|
/^afpd_LDADD
|
|
|
|
/am__append_2
|
|
|
|
a
|
2020-11-11 21:58:26 +01:00
|
|
|
${libtirpc}/lib/libtirpc.so \\
|
2016-09-02 20:38:03 +02:00
|
|
|
.
|
|
|
|
w
|
|
|
|
EOF
|
|
|
|
'';
|
|
|
|
|
2017-11-09 05:52:23 +01:00
|
|
|
postInstall = ''
|
|
|
|
buildPythonPath ${python.pkgs.dbus-python}
|
|
|
|
patchPythonScript $out/bin/afpstats
|
|
|
|
'';
|
|
|
|
|
2016-09-01 10:46:11 +02:00
|
|
|
enableParallelBuilding = true;
|
2013-09-16 07:54:57 +02:00
|
|
|
|
|
|
|
meta = {
|
2015-08-14 07:05:03 +02:00
|
|
|
description = "Apple Filing Protocol Server";
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "http://netatalk.sourceforge.net/";
|
2021-01-15 10:19:50 +01:00
|
|
|
license = lib.licenses.gpl3;
|
|
|
|
platforms = lib.platforms.linux;
|
|
|
|
maintainers = with lib.maintainers; [ jcumming ];
|
2013-09-16 07:54:57 +02:00
|
|
|
};
|
|
|
|
}
|