diff options
author | Ryan Mulligan <ryan@ryantm.com> | 2021-11-30 21:39:11 +0100 |
---|---|---|
committer | Astro <astro@spaceboyz.net> | 2021-11-30 21:43:42 +0100 |
commit | 036b9094211e223dce4de233c0063a6fcd47deb8 (patch) | |
tree | bb1e2fc7aba121100d2a2d62daff76aeccda02f8 /pkgs/os-specific/linux/ocf-resource-agents | |
parent | 5b42db35988d7a08e3150f1c4852259d30ae8dd7 (diff) |
drbd: 8.4.4 -> 9.19.1, ocf-resource-agents: init at 4.10.0
Diffstat (limited to 'pkgs/os-specific/linux/ocf-resource-agents')
-rw-r--r-- | pkgs/os-specific/linux/ocf-resource-agents/default.nix | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/pkgs/os-specific/linux/ocf-resource-agents/default.nix b/pkgs/os-specific/linux/ocf-resource-agents/default.nix new file mode 100644 index 0000000000000..9c9557c7be851 --- /dev/null +++ b/pkgs/os-specific/linux/ocf-resource-agents/default.nix @@ -0,0 +1,56 @@ +{ stdenv +, lib +, runCommand +, lndir +, fetchFromGitHub +, autoreconfHook +, pkg-config +, python3 +, glib +, drbd +}: + +let + drbdForOCF = drbd.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 +'' |