22 # Pacemaker is compiled twice, once with forOCF = true to extract its
23 # OCF definitions for use in the ocf-resource-agents derivation, then
24 # again with forOCF = false, where the ocf-resource-agents is provided
30 stdenv.mkDerivation rec {
34 src = fetchFromGitHub {
35 owner = "ClusterLabs";
37 rev = "Pacemaker-${version}";
38 sha256 = "sha256-b3ljxAuawhqTnURBJMqy4Zzzfi8PCFwie/zC1yeErhQ=";
64 ./autogen.sh --prefix="$out"
67 "--exec-prefix=${placeholder "out"}"
69 "--localstatedir=/var"
70 "--with-initdir=/etc/systemd/system"
71 "--with-systemdsystemunitdir=/etc/systemd/system"
73 # allows Type=notify in the systemd service
75 ] ++ lib.optional (!forOCF) "--with-ocfdir=${ocf-resource-agents}/usr/lib/ocf";
77 installFlags = [ "DESTDIR=${placeholder "out"}" ];
79 NIX_CFLAGS_COMPILE = lib.optionals stdenv.cc.isGNU [
80 "-Wno-error=strict-prototypes"
83 enableParallelBuilding = true;
86 # pacemaker's install linking requires a weirdly nested hierarchy
92 inherit (nixosTests) pacemaker;
96 homepage = "https://clusterlabs.org/pacemaker/";
97 description = "Pacemaker is an open source, high availability resource manager suitable for both small and large clusters.";
98 license = licenses.gpl2Plus;
99 platforms = platforms.linux;
100 maintainers = with maintainers; [ ryantm astro ];