nixpkgs/pkgs/tools/filesystems/netatalk/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

68 lines
1.9 KiB
Nix
Raw Normal View History

2021-11-28 20:04:05 +01:00
{ fetchurl, lib, stdenv, autoreconfHook, pkg-config, perl, python3
2017-11-09 05:52:23 +01:00
, db, libgcrypt, avahi, libiconv, pam, openssl, acl
2021-11-28 20:04:05 +01:00
, ed, libtirpc, libevent, fetchpatch
2017-11-09 05:52:23 +01:00
}:
2013-09-16 07:54:57 +02:00
stdenv.mkDerivation rec {
pname = "netatalk";
version = "3.1.13";
2013-09-16 07:54:57 +02:00
src = fetchurl {
url = "mirror://sourceforge/netatalk/netatalk/netatalk-${version}.tar.bz2";
sha256 = "0pg0slvvvq3l6f5yjz9ybijg4i6rs5a6c8wcynaasf8vzsyadbc9";
2013-09-16 07:54:57 +02:00
};
2017-11-09 05:52:23 +01:00
patches = [
./no-suid.patch
./omitLocalstatedirCreation.patch
2021-11-28 20:04:05 +01:00
(fetchpatch {
name = "make-afpstats-python3-compatible.patch";
url = "https://github.com/Netatalk/Netatalk/commit/916b515705cf7ba28dc53d13202811c6e1fe6a9e.patch";
sha256 = "sha256-DAABpYjQPJLsQBhmtP30gA357w0Qn+AsnFgAeyDC/Rg=";
})
2017-11-09 05:52:23 +01:00
];
2021-11-28 20:04:05 +01:00
nativeBuildInputs = [ autoreconfHook pkg-config perl python3 python3.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 = [
"--with-bdb=${db.dev}"
2017-11-09 05:52:23 +01:00
"--with-ssl-dir=${openssl.dev}"
"--with-lockfile=/run/lock/netatalk"
2019-09-13 19:02:18 +02:00
"--with-libevent=${libevent.dev}"
"--localstatedir=/var/lib"
2013-09-16 07:54:57 +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 \\
.
w
EOF
'';
2017-11-09 05:52:23 +01:00
postInstall = ''
2021-11-28 20:04:05 +01:00
buildPythonPath ${python3.pkgs.dbus-python}
2017-11-09 05:52:23 +01:00
patchPythonScript $out/bin/afpstats
'';
enableParallelBuilding = true;
2013-09-16 07:54:57 +02:00
meta = {
description = "Apple Filing Protocol Server";
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
};
}