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-L/LQS5XLps0pqTfMAh1ZiR00SVltrNxMl6DXQhXBw1Q=";
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 env.NIX_CFLAGS_COMPILE = toString (lib.optionals stdenv.cc.isGNU [
80 "-Wno-error=strict-prototypes"
81 "-Wno-error=deprecated-declarations"
84 enableParallelBuilding = true;
87 # pacemaker's install linking requires a weirdly nested hierarchy
93 inherit (nixosTests) pacemaker;
97 homepage = "https://clusterlabs.org/pacemaker/";
98 description = "Pacemaker is an open source, high availability resource manager suitable for both small and large clusters";
99 license = licenses.gpl2Plus;
100 platforms = platforms.linux;
101 maintainers = with maintainers; [ ryantm astro ];