summary refs log tree commit diff
path: root/pkgs/tools/filesystems/zkfuse/default.nix
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2021-08-04 10:43:07 +0000
committerAlyssa Ross <hi@alyssa.is>2021-08-04 10:43:07 +0000
commit62614cbef7da005c1eda8c9400160f6bcd6546b8 (patch)
treec2630f69080637987b68acb1ee8676d2681fe304 /pkgs/tools/filesystems/zkfuse/default.nix
parentd9c82ed3044c72cecf01c6ea042489d30914577c (diff)
parente24069138dfec3ef94f211f1da005bb5395adc11 (diff)
downloadnixpkgs-62614cbef7da005c1eda8c9400160f6bcd6546b8.tar
nixpkgs-62614cbef7da005c1eda8c9400160f6bcd6546b8.tar.gz
nixpkgs-62614cbef7da005c1eda8c9400160f6bcd6546b8.tar.bz2
nixpkgs-62614cbef7da005c1eda8c9400160f6bcd6546b8.tar.lz
nixpkgs-62614cbef7da005c1eda8c9400160f6bcd6546b8.tar.xz
nixpkgs-62614cbef7da005c1eda8c9400160f6bcd6546b8.tar.zst
nixpkgs-62614cbef7da005c1eda8c9400160f6bcd6546b8.zip
Merge branch 'nixpkgs-update' into master
Diffstat (limited to 'pkgs/tools/filesystems/zkfuse/default.nix')
-rw-r--r--pkgs/tools/filesystems/zkfuse/default.nix28
1 files changed, 22 insertions, 6 deletions
diff --git a/pkgs/tools/filesystems/zkfuse/default.nix b/pkgs/tools/filesystems/zkfuse/default.nix
index 89516d525af..456444f3bf5 100644
--- a/pkgs/tools/filesystems/zkfuse/default.nix
+++ b/pkgs/tools/filesystems/zkfuse/default.nix
@@ -1,14 +1,30 @@
-{ stdenv, lib, zookeeper, zookeeper_mt, fuse, autoreconfHook, log4cxx, boost }:
+{ stdenv
+, lib
+, autoreconfHook
+, gnused
+, boost
+, fuse
+, log4cxx
+, zookeeper
+, zookeeper_mt
+}:
 
-stdenv.mkDerivation {
+stdenv.mkDerivation rec {
   pname = "zkfuse";
-  inherit (zookeeper) version src;
+  inherit (zookeeper_mt) version src;
 
-  sourceRoot = "${zookeeper.name}/src/contrib/zkfuse";
+  sourceRoot = "apache-${zookeeper.pname}-${version}/zookeeper-contrib/zookeeper-contrib-zkfuse";
 
-  nativeBuildInputs = [ autoreconfHook ];
+  nativeBuildInputs = [ autoreconfHook gnused ];
   buildInputs = [ zookeeper_mt log4cxx boost fuse ];
 
+  postPatch = ''
+    # Make the async API accessible, and use the proper include path.
+    sed -i src/zkadapter.h \
+        -e '/"zookeeper\.h"/i#define THREADED' \
+        -e 's,"zookeeper\.h",<zookeeper/zookeeper.h>,'
+  '';
+
   installPhase = ''
     mkdir -p $out/bin
     cp -v src/zkfuse $out/bin
@@ -16,7 +32,7 @@ stdenv.mkDerivation {
 
   meta = with lib; {
     platforms = platforms.linux;
-    maintainers = with maintainers; [ cstrahan ];
+    maintainers = with maintainers; [ cstrahan ztzg ];
     license = licenses.asl20;
   };
 }