summary refs log tree commit diff
diff options
context:
space:
mode:
authorVikram Narayanan <vikram186@gmail.com>2021-11-28 11:04:05 -0800
committergithub-actions[bot] <github-actions[bot]@users.noreply.github.com>2021-11-28 22:38:41 +0000
commit95293a782b917ebd909df0ad68becb853f10a386 (patch)
tree93b223daec2aaf9662fe2b6515da488096bdcdc7
parenta80798e6a2869f252d9af21397ea59e3f709ca8a (diff)
netatalk: fix build
(cherry picked from commit 0a9dd29c98c6dd720bfb9e5e6d8a3b551fc71d94)
-rw-r--r--pkgs/tools/filesystems/netatalk/default.nix13
1 files changed, 9 insertions, 4 deletions
diff --git a/pkgs/tools/filesystems/netatalk/default.nix b/pkgs/tools/filesystems/netatalk/default.nix
index 258b25c3693c8..e5e873b9ac564 100644
--- a/pkgs/tools/filesystems/netatalk/default.nix
+++ b/pkgs/tools/filesystems/netatalk/default.nix
@@ -1,6 +1,6 @@
-{ fetchurl, lib, stdenv, autoreconfHook, pkg-config, perl, python
+{ fetchurl, lib, stdenv, autoreconfHook, pkg-config, perl, python3
 , db, libgcrypt, avahi, libiconv, pam, openssl, acl
-, ed, libtirpc, libevent
+, ed, libtirpc, libevent, fetchpatch
 }:
 
 stdenv.mkDerivation rec {
@@ -15,9 +15,14 @@ stdenv.mkDerivation rec {
   patches = [
     ./no-suid.patch
     ./omitLocalstatedirCreation.patch
+    (fetchpatch {
+      name = "make-afpstats-python3-compatible.patch";
+      url = "https://github.com/Netatalk/Netatalk/commit/916b515705cf7ba28dc53d13202811c6e1fe6a9e.patch";
+      sha256 = "sha256-DAABpYjQPJLsQBhmtP30gA357w0Qn+AsnFgAeyDC/Rg=";
+    })
   ];
 
-  nativeBuildInputs = [ autoreconfHook pkg-config perl python python.pkgs.wrapPython ];
+  nativeBuildInputs = [ autoreconfHook pkg-config perl python3 python3.pkgs.wrapPython ];
 
   buildInputs = [ db libgcrypt avahi libiconv pam openssl acl libevent ];
 
@@ -46,7 +51,7 @@ stdenv.mkDerivation rec {
   '';
 
   postInstall = ''
-    buildPythonPath ${python.pkgs.dbus-python}
+    buildPythonPath ${python3.pkgs.dbus-python}
     patchPythonScript $out/bin/afpstats
   '';