Begin adding support for using opentofu through openbao secrets

This commit is contained in:
Kaare Hoff Skovgaard 2025-07-07 23:10:53 +02:00
parent 8e31f30762
commit e61b3b06f3
Signed by: khs
GPG key ID: C7D890804F01E9F0
12 changed files with 551 additions and 39 deletions

View file

@ -33,7 +33,11 @@ let
in
{
buildRustPackage =
crateName:
{
crateName,
runtimeInputs,
replacePath ? false,
}:
craneLib.buildPackage (
individualCrateArgs
// {
@ -41,15 +45,15 @@ in
cargoExtraArgs = "-p ${crateName}";
src = fileSetForCrate crateName;
nativeBuildInputs = [ pkgs.makeWrapper ];
postFixup = ''
wrapProgram $out/bin/${crateName} --set PATH "${
lib.makeBinPath [
pkgs.curl
pkgs.uutils-coreutils-noprefix
pkgs.iproute2
]
}"
'';
postFixup =
if replacePath then
''
wrapProgram $out/bin/${crateName} --set PATH "${lib.makeBinPath runtimeInputs}"
''
else
''
wrapProgram $out/bin/${crateName} --suffix PATH : "${lib.makeBinPath runtimeInputs}"
'';
meta = {
mainProgram = crateName;
};