ocf-resource-agents: fix pos attribute to define source location

Without the change commands like

    $ nix edit -f. ocf-resource-agents

do not point to a file.
This commit is contained in:
Sergei Trofimovich 2024-02-07 10:31:59 +00:00
parent 7f90b56ea1
commit 35e16bd907

View File

@ -60,7 +60,12 @@ 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" {} ''
runCommand "ocf-resource-agents" {
# Fix derivation location so things like
# $ nix edit -f. ocf-resource-agents
# just work.
pos = builtins.unsafeGetAttrPos "version" resource-agentsForOCF;
} ''
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