3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/tools/filesystems/netatalk/default.nix

62 lines
1.7 KiB
Nix
Raw Normal View History

2017-11-09 04:52:23 +00:00
{ fetchurl, stdenv, autoreconfHook, pkgconfig, perl, python
, db, libgcrypt, avahi, libiconv, pam, openssl, acl
2019-09-13 18:02:18 +01:00
, ed, glibc, libevent
2017-11-09 04:52:23 +00:00
}:
2013-09-16 06:54:57 +01:00
stdenv.mkDerivation rec {
name = "netatalk-3.1.12";
2013-09-16 06:54:57 +01:00
src = fetchurl {
url = "mirror://sourceforge/netatalk/netatalk/${name}.tar.bz2";
sha256 = "1ld5mnz88ixic21m6f0xcgf8v6qm08j6xabh1dzfj6x47lxghq0m";
2013-09-16 06:54:57 +01:00
};
2017-11-09 04:52:23 +00:00
patches = [
./no-suid.patch
./omitLocalstatedirCreation.patch
];
2017-11-09 04:52:23 +00:00
nativeBuildInputs = [ autoreconfHook pkgconfig perl python python.pkgs.wrapPython ];
2019-09-13 18:02:18 +01:00
buildInputs = [ db libgcrypt avahi libiconv pam openssl acl libevent ];
2013-09-16 06:54:57 +01:00
configureFlags = [
"--with-bdb=${db.dev}"
2017-11-09 04:52:23 +00:00
"--with-ssl-dir=${openssl.dev}"
"--with-lockfile=/run/lock/netatalk"
2019-09-13 18:02:18 +01:00
"--with-libevent=${libevent.dev}"
"--localstatedir=/var/lib"
2013-09-16 06:54:57 +01: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
${glibc.static}/lib/librpcsvc.a \\
.
w
EOF
'';
2017-11-09 04:52:23 +00:00
postInstall = ''
buildPythonPath ${python.pkgs.dbus-python}
patchPythonScript $out/bin/afpstats
'';
enableParallelBuilding = true;
2013-09-16 06:54:57 +01:00
meta = {
description = "Apple Filing Protocol Server";
homepage = "http://netatalk.sourceforge.net/";
2013-09-16 06:54:57 +01:00
license = stdenv.lib.licenses.gpl3;
platforms = stdenv.lib.platforms.linux;
maintainers = with stdenv.lib.maintainers; [ jcumming ];
};
}