Merge pull request #287051 from trofi/ocf-resource-agents-fix-meta

ocf-resource-agents: fix `pos` attribute to define source location
This commit is contained in:
Mario Rodas 2024-03-08 09:02:42 -05:00 committed by GitHub
commit d2429ffaa8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -71,7 +71,17 @@ 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;
# Useful to build and undate inputs individually:
passthru.inputs = {
inherit resource-agentsForOCF drbdForOCF pacemakerForOCF;
};
} ''
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