nixpkgs/pkgs/by-name/ne/netatalk/package.nix
aleksana 571c71e6f7 treewide: migrate packages to pkgs/by-name, take 1
We are migrating packages that meet below requirements:

1. using `callPackage`
2. called path is a directory
3. overriding set is empty (`{ }`)
4. not containing path expressions other than relative path (to
makenixpkgs-vet happy)
5. not referenced by nix files outside of the directory, other
than`pkgs/top-level/all-packages.nix`
6. not referencing nix files outside of the directory
7. not referencing `default.nix` (since it's changed to `package.nix`)
8. `outPath` doesn't change after migration

The tool is here: https://github.com/Aleksanaa/by-name-migrate.
2024-11-09 20:04:51 +08:00

74 lines
1.3 KiB
Nix

{ lib
, stdenv
, fetchurl
, acl
, autoreconfHook
, avahi
, db
, libevent
, libgcrypt
, libiconv
, openssl
, pam
, perl
, pkg-config
, python3
}:
stdenv.mkDerivation (finalAttrs: {
pname = "netatalk";
version = "3.1.19";
src = fetchurl {
url = "mirror://sourceforge/netatalk/netatalk/netatalk-${finalAttrs.version}.tar.bz2";
hash = "sha256-p0pzHwnjNNWPsWRBflgaZB+ijMP5bF99TEdLs4mVKsI=";
};
patches = [
./000-no-suid.patch
./001-omit-localstatedir-creation.patch
];
nativeBuildInputs = [
autoreconfHook
pkg-config
perl
python3
python3.pkgs.wrapPython
];
buildInputs = [
acl
avahi
db
libevent
libgcrypt
libiconv
openssl
pam
];
configureFlags = [
"--with-bdb=${db.dev}"
"--with-ssl-dir=${openssl.dev}"
"--with-lockfile=/run/lock/netatalk"
"--localstatedir=/var/lib"
];
postInstall = ''
sed -i -e "s%/usr/bin/env python%${python3}/bin/python3%" $out/bin/afpstats
buildPythonPath ${python3.pkgs.dbus-python}
patchPythonScript $out/bin/afpstats
'';
enableParallelBuilding = true;
meta = with lib; {
description = "Apple Filing Protocol Server";
homepage = "http://netatalk.sourceforge.net/";
license = licenses.gpl2Plus;
platforms = platforms.linux;
maintainers = with maintainers; [ jcumming ];
};
})