Merge pull request #311643 from spk/upsun-darwin

upsun: add darwin build
This commit is contained in:
Pol Dellaiera 2024-05-15 10:46:41 +02:00 committed by GitHub
commit 305203ef86
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -5,14 +5,22 @@ stdenvNoCC.mkDerivation rec {
version = "5.0.12"; version = "5.0.12";
src = { src = {
x86_64-linux = fetchurl { x86_64-darwin = (fetchurl {
url = "https://github.com/platformsh/cli/releases/download/${version}/upsun_${version}_darwin_all.tar.gz";
hash = "sha256-RwTMJwvkuX/okHSyxzpvaD6uD8fheVbr7bgBC2eMQOo=";
});
aarch64-darwin = (fetchurl {
url = "https://github.com/platformsh/cli/releases/download/${version}/upsun_${version}_darwin_all.tar.gz";
hash = "sha256-RwTMJwvkuX/okHSyxzpvaD6uD8fheVbr7bgBC2eMQOo=";
});
x86_64-linux = (fetchurl {
url = "https://github.com/platformsh/cli/releases/download/${version}/upsun_${version}_linux_amd64.tar.gz"; url = "https://github.com/platformsh/cli/releases/download/${version}/upsun_${version}_linux_amd64.tar.gz";
hash = "sha256-svEPMVY7r7pAoXwFIMYqCEduqR3Nkocaguf2nIGt+G8="; hash = "sha256-svEPMVY7r7pAoXwFIMYqCEduqR3Nkocaguf2nIGt+G8=";
}; });
aarch64-linux = fetchurl { aarch64-linux = (fetchurl {
url = "https://github.com/platformsh/cli/releases/download/${version}/upsun_${version}_linux_arm64.tar.gz"; url = "https://github.com/platformsh/cli/releases/download/${version}/upsun_${version}_linux_arm64.tar.gz";
hash = "sha256-ZraS/PqSPL/kcj5o6hzDdL70IV2IWXOma6OHCiXIDQc="; hash = "sha256-ZraS/PqSPL/kcj5o6hzDdL70IV2IWXOma6OHCiXIDQc=";
}; });
}.${stdenvNoCC.system} or (throw "${pname}-${version}: ${stdenvNoCC.system} is unsupported."); }.${stdenvNoCC.system} or (throw "${pname}-${version}: ${stdenvNoCC.system} is unsupported.");
dontConfigure = true; dontConfigure = true;
@ -26,9 +34,10 @@ stdenvNoCC.mkDerivation rec {
meta = { meta = {
homepage = "https://github.com/platformsh/cli"; homepage = "https://github.com/platformsh/cli";
description = "The unified tool for managing your Upsun services from the command line"; description = "The unified tool for managing your Upsun services from the command line";
mainProgram = "upsun";
maintainers = with lib.maintainers; [ spk ]; maintainers = with lib.maintainers; [ spk ];
license = lib.licenses.mit; license = lib.licenses.mit;
platforms = [ "x86_64-linux" "aarch64-linux" ]; platforms = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ];
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ]; sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
}; };
} }