kubernetes-helmPlugins.helm-unittest: fix per-arch exec error (#537022)
This commit is contained in:
@@ -2,7 +2,6 @@
|
||||
buildGoModule,
|
||||
fetchFromGitHub,
|
||||
lib,
|
||||
yq-go,
|
||||
nix-update-script,
|
||||
}:
|
||||
|
||||
@@ -22,21 +21,29 @@ buildGoModule {
|
||||
|
||||
vendorHash = "sha256-4ckjM520MGYb64LbjYURe7AIScm4aGbj81rGKSSYaAo=";
|
||||
|
||||
# NOTE: Remove the install and upgrade hooks.
|
||||
postPatch = ''
|
||||
sed -i '/^hooks:/,+2 d' plugin.yaml
|
||||
# Remove the install and upgrade hooks.
|
||||
sed -i '/^platformHooks:[[:space:]]*$/,/^[^[:space:]]/d' plugin.yaml
|
||||
# Remove the per-platform commands
|
||||
sed -i '/^platformCommand:[[:space:]]*$/,/^[^[:space:]]/d' plugin.yaml
|
||||
# Add a simple runtime config
|
||||
cat <<'EOF' >> ./plugin.yaml
|
||||
platformCommand:
|
||||
- command: "''$HELM_PLUGIN_DIR/helm-unittest"
|
||||
EOF
|
||||
'';
|
||||
|
||||
postInstall = ''
|
||||
install -dm755 $out/helm-unittest
|
||||
mv $out/bin/helm-unittest $out/helm-unittest/untt
|
||||
rmdir $out/bin
|
||||
install -m644 -Dt $out/helm-unittest plugin.yaml
|
||||
'';
|
||||
subPackages = [ "cmd/helm-unittest" ];
|
||||
|
||||
nativeCheckInputs = [
|
||||
yq-go
|
||||
];
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
install -dm755 "$out/helm-unittest"
|
||||
install -m755 -Dt "$out/helm-unittest" "$GOPATH/bin/helm-unittest"
|
||||
install -m644 -Dt "$out/helm-unittest" ./plugin.yaml
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
passthru = {
|
||||
updateScript = nix-update-script { };
|
||||
|
||||
Reference in New Issue
Block a user