mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-20 19:16:11 +00:00

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.
43 lines
1.0 KiB
Nix
43 lines
1.0 KiB
Nix
{ stdenv
|
|
, lib
|
|
, autoreconfHook
|
|
, boost
|
|
, fuse
|
|
, log4cxx
|
|
, zookeeper
|
|
, zookeeper_mt
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "zkfuse";
|
|
inherit (zookeeper_mt) version src;
|
|
|
|
sourceRoot = "apache-${zookeeper.pname}-${version}/zookeeper-contrib/zookeeper-contrib-zkfuse";
|
|
|
|
nativeBuildInputs = [ autoreconfHook ];
|
|
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>,'
|
|
'';
|
|
|
|
# c++17 (gcc-11's default) breaks the build as:
|
|
# zkadapter.h:616:33: error: ISO C++17 does not allow dynamic exception specifications
|
|
env.NIX_CFLAGS_COMPILE = toString [ "-std=c++14" ];
|
|
|
|
installPhase = ''
|
|
mkdir -p $out/bin
|
|
cp -v src/zkfuse $out/bin
|
|
'';
|
|
|
|
meta = with lib; {
|
|
platforms = platforms.linux;
|
|
maintainers = with maintainers; [ ztzg ];
|
|
license = licenses.asl20;
|
|
mainProgram = "zkfuse";
|
|
};
|
|
}
|