diff options
author | Sergei Trofimovich <slyich@gmail.com> | 2024-02-07 10:31:59 +0000 |
---|---|---|
committer | Sergei Trofimovich <slyich@gmail.com> | 2024-02-07 10:32:37 +0000 |
commit | 35e16bd907627b41b212e33a809aff85b81229bf (patch) | |
tree | a41f224bd169710bda3e2effb82fe753389c44f9 /pkgs/os-specific/linux | |
parent | 7f90b56ea122222d295971aee3c95d9f48ee38fe (diff) |
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.
Diffstat (limited to 'pkgs/os-specific/linux')
-rw-r--r-- | pkgs/os-specific/linux/ocf-resource-agents/default.nix | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/pkgs/os-specific/linux/ocf-resource-agents/default.nix b/pkgs/os-specific/linux/ocf-resource-agents/default.nix index 11f094f72c9dc..36a536cf2063b 100644 --- a/pkgs/os-specific/linux/ocf-resource-agents/default.nix +++ b/pkgs/os-specific/linux/ocf-resource-agents/default.nix @@ -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 |