3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/os-specific/linux/ocf-resource-agents/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

64 lines
1.6 KiB
Nix
Raw Normal View History

2021-02-24 17:36:49 +00:00
# This combines together OCF definitions from other derivations.
# https://github.com/ClusterLabs/resource-agents/blob/master/doc/dev-guides/ra-dev-guide.asc
{ stdenv
, lib
, runCommand
, lndir
, fetchFromGitHub
, autoreconfHook
, pkg-config
, python3
, glib
, drbd
2021-02-24 17:36:49 +00:00
, pacemaker
}:
let
drbdForOCF = drbd.override {
forOCF = true;
};
2021-02-24 17:36:49 +00:00
pacemakerForOCF = pacemaker.override {
forOCF = true;
};
resource-agentsForOCF = stdenv.mkDerivation rec {
pname = "resource-agents";
version = "4.10.0";
src = fetchFromGitHub {
owner = "ClusterLabs";
repo = pname;
rev = "v${version}";
sha256 = "0haryi3yrszdfpqnkfnppxj1yiy6ipah6m80snvayc7v0ss0wnir";
};
nativeBuildInputs = [
autoreconfHook
pkg-config
];
buildInputs = [
glib
python3
];
meta = with lib; {
homepage = "https://github.com/ClusterLabs/resource-agents";
description = "Combined repository of OCF agents from the RHCS and Linux-HA projects";
license = licenses.gpl2Plus;
platforms = platforms.linux;
maintainers = with maintainers; [ ryantm astro ];
};
};
in
# This combines together OCF definitions from other derivations.
# https://github.com/ClusterLabs/resource-agents/blob/master/doc/dev-guides/ra-dev-guide.asc
runCommand "ocf-resource-agents" {} ''
mkdir -p $out/usr/lib/ocf
${lndir}/bin/lndir -silent "${resource-agentsForOCF}/lib/ocf/" $out/usr/lib/ocf
${lndir}/bin/lndir -silent "${drbdForOCF}/usr/lib/ocf/" $out/usr/lib/ocf
2021-02-24 17:36:49 +00:00
${lndir}/bin/lndir -silent "${pacemakerForOCF}/usr/lib/ocf/" $out/usr/lib/ocf
''