Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib, stdenv, fetchFromGitHub, fetchpatch, autoreconfHook, pkg-config, libxml2 }:
2
3stdenv.mkDerivation rec {
4 pname = "libqb";
5 version = "2.0.8";
6
7 src = fetchFromGitHub {
8 owner = "ClusterLabs";
9 repo = pname;
10 rev = "v${version}";
11 sha256 = "sha256-ZjxC7W4U8T68mZy/OvWj/e4W9pJIj2lVDoEjxXYr/G8=";
12 };
13
14 patches = [
15 # add a declaration of fdatasync, missing on darwin https://github.com/ClusterLabs/libqb/pull/496
16 (fetchpatch {
17 url = "https://github.com/ClusterLabs/libqb/commit/255ccb70ee19cc0c82dd13e4fd5838ca5427795f.patch";
18 hash = "sha256-6x4B3FM0XSRIeAly8JtMOGOdyunTcbaDzUeBZInXR4U=";
19 })
20 ];
21
22 nativeBuildInputs = [ autoreconfHook pkg-config ];
23
24 buildInputs = [ libxml2 ];
25
26 postPatch = ''
27 sed -i '/# --enable-new-dtags:/,/--enable-new-dtags is required/ d' configure.ac
28 '';
29
30 meta = with lib; {
31 homepage = "https://github.com/clusterlabs/libqb";
32 description = "Library providing high performance logging, tracing, ipc, and poll";
33 license = licenses.lgpl21Plus;
34 platforms = platforms.unix;
35 };
36}