lol
1{ fetchurl, stdenv, pkgconfig, db, libgcrypt, avahi, libiconv, pam, openssl, acl, ed, glibc }:
2
3stdenv.mkDerivation rec{
4 name = "netatalk-3.1.7";
5
6 src = fetchurl {
7 url = "mirror://sourceforge/netatalk/netatalk/${name}.tar.bz2";
8 sha256 = "0wf09fyqzza024qr1s26z5x7rsvh9zb4pv598gw7gm77wjcr6174";
9 };
10
11 buildInputs = [ pkgconfig db libgcrypt avahi libiconv pam openssl acl ];
12
13 patches = ./omitLocalstatedirCreation.patch;
14
15 configureFlags = [
16 "--with-bdb=${db}"
17 "--with-openssl=${openssl.dev}"
18 "--with-lockfile=/run/lock/netatalk"
19 "--localstatedir=/var/lib"
20 ];
21
22 # Expose librpcsvc to the linker for afpd
23 # Fixes errors that showed up when closure-size was merged:
24 # afpd-nfsquota.o: In function `callaurpc':
25 # netatalk-3.1.7/etc/afpd/nfsquota.c:78: undefined reference to `xdr_getquota_args'
26 # netatalk-3.1.7/etc/afpd/nfsquota.c:78: undefined reference to `xdr_getquota_rslt'
27 postConfigure = ''
28 ${ed}/bin/ed -v etc/afpd/Makefile << EOF
29 /^afpd_LDADD
30 /am__append_2
31 a
32 ${glibc.static}/lib/librpcsvc.a \\
33 .
34 w
35 EOF
36 '';
37
38 enableParallelBuilding = true;
39
40 meta = {
41 description = "Apple Filing Protocol Server";
42 homepage = http://netatalk.sourceforge.net/;
43 license = stdenv.lib.licenses.gpl3;
44 platforms = stdenv.lib.platforms.linux;
45 maintainers = with stdenv.lib.maintainers; [ jcumming ];
46 };
47}