git.iko.soy/typeable/nixpkgs
on master help sign in
perlPackages.NetZooKeeper: adapt to zookeeper_mt 3.6.2
commita429badcc86601a41a4b2e43ce983ab6f44da75d authorDamien Diederen <dd@crosstwine.com> dateWed 25 Nov 2020, 10:33 (6 years ago) parent03dec29
2 files changed+33−8
nixos/tests/zookeeper.nix+14−2 pkgs/top-level/perl-packages.nix+19−6
nixos/tests/zookeeper.nix+14−2
@@ -1,7 +1,12 @@
1−import ./make-test-python.nix ({ pkgs, ...} : {
1+import ./make-test-python.nix ({ pkgs, ...} :
2+let
3+
4+ perlEnv = pkgs.perl.withPackages (p: [p.NetZooKeeper]);
5+
6+in {
27 name = "zookeeper";
38 meta = with pkgs.stdenv.lib.maintainers; {
4− maintainers = [ nequissimus ];
9+ maintainers = [ nequissimus ztzg ];
510 };
611
712 nodes = {
@@ -30,5 +35,12 @@ import ./make-test-python.nix ({ pkgs, ...} : {
3035 server.wait_until_succeeds(
3136 "${pkgs.zookeeper}/bin/zkCli.sh -server localhost:2181 get /foo | grep hello"
3237 )
38+
39+ server.wait_until_succeeds(
40+ "${perlEnv}/bin/perl -E 'use Net::ZooKeeper qw(:acls); $z=Net::ZooKeeper->new(q(localhost:2181)); $z->create(qw(/perl foo acl), ZOO_OPEN_ACL_UNSAFE) || die $z->get_error()'"
41+ )
42+ server.wait_until_succeeds(
43+ "${perlEnv}/bin/perl -E 'use Net::ZooKeeper qw(:acls); $z=Net::ZooKeeper->new(q(localhost:2181)); $z->get(qw(/perl)) eq qw(foo) || die $z->get_error()'"
44+ )
3345 '';
3446})
pkgs/top-level/perl-packages.nix+19−6
@@ -15752,18 +15752,31 @@ let
1575215752
1575315753 NetZooKeeper = buildPerlPackage {
1575415754 pname = "Net-ZooKeeper";
15755− version = "0.41";
15756− src = fetchurl {
15757− url = "mirror://cpan/authors/id/M/MA/MAF/Net-ZooKeeper-0.41.tar.gz";
15758− sha256 = "91c177f30f82302eaf3173356eef05c21bc82163df752acb469177bd14a72db9";
15755+ version = "0.42pre";
15756+ src = fetchFromGitHub {
15757+ owner = "mark-5";
15758+ repo = "p5-net-zookeeper";
15759+ rev = "66e1a360aff9c39af728c36092b540a4b6045f70";
15760+ sha256 = "0xl8lcv9gfv0nn8vrrxa4az359whqdhmzw4r51nn3add8pn3s9ip";
1575915761 };
1576015762 buildInputs = [ pkgs.zookeeper_mt ];
15763+ nativeBuildInputs = [ pkgs.gnused ];
1576115764 # fix "error: format not a string literal and no format arguments [-Werror=format-security]"
1576215765 hardeningDisable = [ "format" ];
15763− NIX_CFLAGS_COMPILE = "-I${pkgs.zookeeper_mt}/include";
15766+ # Make the async API accessible
15767+ NIX_CFLAGS_COMPILE = "-DTHREADED";
1576415768 NIX_CFLAGS_LINK = "-L${pkgs.zookeeper_mt.out}/lib -lzookeeper_mt";
15769+ # Most tests are skipped as no server is available in the sandbox.
15770+ # `t/35_log.t` seems to suffer from a race condition; remove it. See
15771+ # https://github.com/NixOS/nixpkgs/pull/104889#issuecomment-737144513
15772+ preCheck = ''
15773+ rm t/35_log.t
15774+ '' + stdenv.lib.optionalString stdenv.isDarwin ''
15775+ rm t/30_connect.t
15776+ rm t/45_class.t
15777+ '';
1576515778 meta = {
15766− maintainers = [ maintainers.limeytexan ];
15779+ maintainers = with maintainers; [ limeytexan ztzg ];
1576715780 homepage = "https://github.com/mark-5/p5-net-zookeeper";
1576815781 license = stdenv.lib.licenses.asl20;
1576915782 };