push sheeet
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s

This commit is contained in:
Dark Steveneq
2025-10-09 14:15:47 +02:00
commit 646b892680
49168 changed files with 5897842 additions and 0 deletions

View File

@@ -0,0 +1,78 @@
{
stdenvNoCC,
lib,
fetchurl,
testers,
installShellFiles,
platformsh,
}:
let
versions = lib.importJSON ./versions.json;
arch =
if stdenvNoCC.hostPlatform.isx86_64 then
"amd64"
else if stdenvNoCC.hostPlatform.isAarch64 then
"arm64"
else
throw "Unsupported architecture";
os =
if stdenvNoCC.hostPlatform.isLinux then
"linux"
else if stdenvNoCC.hostPlatform.isDarwin then
"darwin"
else
throw "Unsupported os";
versionInfo = versions."${os}-${arch}";
inherit (versionInfo) hash url;
in
stdenvNoCC.mkDerivation (finalAttrs: {
pname = "platformsh";
inherit (versions) version;
nativeBuildInputs = [ installShellFiles ];
# run ./update
src = fetchurl { inherit hash url; };
dontConfigure = true;
dontBuild = true;
sourceRoot = ".";
installPhase = ''
runHook preInstall
install -Dm755 platform $out/bin/platform
installShellCompletion completion/bash/platform.bash \
completion/zsh/_platform
runHook postInstall
'';
passthru = {
updateScript = ./update.sh;
tests.version = testers.testVersion {
inherit (finalAttrs) version;
package = platformsh;
};
};
meta = {
description = "Unified tool for managing your Platform.sh services from the command line";
homepage = "https://github.com/platformsh/cli";
license = lib.licenses.mit;
mainProgram = "platform";
maintainers = with lib.maintainers; [
spk
];
platforms = [
"x86_64-linux"
"aarch64-linux"
"x86_64-darwin"
"aarch64-darwin"
];
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
};
})

View File

@@ -0,0 +1,29 @@
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p curl jq
#shellcheck shell=bash
set -eu -o pipefail
version=$(curl -s ${GITHUB_TOKEN:+-u ":$GITHUB_TOKEN"} \
https://api.github.com/repos/platformsh/cli/releases/latest | jq -e -r ".tag_name")
linux_arm64_url=https://github.com/platformsh/cli/releases/download/$version/platform_${version}_linux_arm64.tar.gz
linux_amd64_url=https://github.com/platformsh/cli/releases/download/$version/platform_${version}_linux_amd64.tar.gz
darwin_all_url=https://github.com/platformsh/cli/releases/download/$version/platform_${version}_darwin_all.tar.gz
linux_arm64_hash=$(nix --extra-experimental-features nix-command hash to-sri --type sha256 $(nix-prefetch-url --type sha256 "$linux_arm64_url"))
linux_amd64_hash=$(nix --extra-experimental-features nix-command hash to-sri --type sha256 $(nix-prefetch-url --type sha256 "$linux_amd64_url"))
darwin_all_hash=$(nix --extra-experimental-features nix-command hash to-sri --type sha256 $(nix-prefetch-url --type sha256 "$darwin_all_url"))
jq -n \
--arg version "$version" \
--arg darwin_all_hash "$darwin_all_hash" \
--arg darwin_all_url "$darwin_all_url" \
--arg linux_amd64_hash "$linux_amd64_hash" \
--arg linux_amd64_url "$linux_amd64_url" \
--arg linux_arm64_hash "$linux_arm64_hash" \
--arg linux_arm64_url "$linux_arm64_url" \
'{ "version": $version,
"darwin-amd64": { "hash": $darwin_all_hash, "url": $darwin_all_url },
"darwin-arm64": { "hash": $darwin_all_hash, "url": $darwin_all_url },
"linux-amd64": { "hash": $linux_amd64_hash, "url": $linux_amd64_url },
"linux-arm64": { "hash": $linux_arm64_hash, "url": $linux_arm64_url }
}' > pkgs/by-name/pl/platformsh/versions.json

View File

@@ -0,0 +1,19 @@
{
"version": "5.5.0",
"darwin-amd64": {
"hash": "sha256-cuLDYW0kr6D2qMhVW+avwbnqq6KI4zRyNBbNSNOpY2o=",
"url": "https://github.com/platformsh/cli/releases/download/5.5.0/platform_5.5.0_darwin_all.tar.gz"
},
"darwin-arm64": {
"hash": "sha256-cuLDYW0kr6D2qMhVW+avwbnqq6KI4zRyNBbNSNOpY2o=",
"url": "https://github.com/platformsh/cli/releases/download/5.5.0/platform_5.5.0_darwin_all.tar.gz"
},
"linux-amd64": {
"hash": "sha256-7WUjkF8u8AvCFT1MtNjYQI3jlmoABmmEUyg4pctCrGo=",
"url": "https://github.com/platformsh/cli/releases/download/5.5.0/platform_5.5.0_linux_amd64.tar.gz"
},
"linux-arm64": {
"hash": "sha256-WTATvnvCF1GDObO14wHWN290/qz24f3gOKgnjNW0xF8=",
"url": "https://github.com/platformsh/cli/releases/download/5.5.0/platform_5.5.0_linux_arm64.tar.gz"
}
}