nixpkgs/pkgs/by-name/up/upsun/package.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

64 lines
2.0 KiB
Nix
Raw Normal View History

{
stdenvNoCC,
lib,
fetchurl,
2024-05-15 11:34:52 +03:00
testers,
upsun
}:
2024-03-27 12:39:40 +03:00
2024-05-15 11:28:49 +03:00
stdenvNoCC.mkDerivation (finalAttrs: {
2024-03-27 12:39:40 +03:00
pname = "upsun";
2024-05-15 11:33:19 +03:00
version = "5.0.13";
2024-03-27 12:39:40 +03:00
src =
{
x86_64-darwin = fetchurl {
url = "https://github.com/platformsh/cli/releases/download/${finalAttrs.version}/upsun_${finalAttrs.version}_darwin_all.tar.gz";
2024-05-15 11:33:19 +03:00
hash = "sha256-5JKXtAUnqrlufyNE05uZjEDfJv557auYPriTxvUbMJI=";
};
aarch64-darwin = fetchurl {
url = "https://github.com/platformsh/cli/releases/download/${finalAttrs.version}/upsun_${finalAttrs.version}_darwin_all.tar.gz";
2024-05-15 11:33:19 +03:00
hash = "sha256-5JKXtAUnqrlufyNE05uZjEDfJv557auYPriTxvUbMJI=";
};
x86_64-linux = fetchurl {
url = "https://github.com/platformsh/cli/releases/download/${finalAttrs.version}/upsun_${finalAttrs.version}_linux_amd64.tar.gz";
2024-05-15 11:33:19 +03:00
hash = "sha256-fjVL/sbO1wmaJ4qZpUMV/4Q4Jzf0p6qx0ElRdY5EUJU=";
};
aarch64-linux = fetchurl {
url = "https://github.com/platformsh/cli/releases/download/${finalAttrs.version}/upsun_${finalAttrs.version}_linux_arm64.tar.gz";
2024-05-15 11:33:19 +03:00
hash = "sha256-MNlQkwsg5SuIQJBDy7yVtcda1odpaUZezCgrat6OW2Q=";
};
}
.${stdenvNoCC.system}
or (throw "${finalAttrs.pname}-${finalAttrs.version}: ${stdenvNoCC.system} is unsupported.");
2024-03-27 12:39:40 +03:00
dontConfigure = true;
dontBuild = true;
sourceRoot = ".";
installPhase = ''
2024-05-15 11:11:18 +03:00
runHook preInstall
2024-03-27 12:39:40 +03:00
install -Dm755 upsun $out/bin/upsun
2024-05-15 11:11:18 +03:00
runHook postInstall
2024-03-27 12:39:40 +03:00
'';
2024-05-15 11:34:52 +03:00
passthru = {
tests.version = testers.testVersion {
inherit (finalAttrs) version;
package = upsun;
};
};
2024-03-27 12:39:40 +03:00
meta = {
homepage = "https://github.com/platformsh/cli";
description = "The unified tool for managing your Upsun services from the command line";
2024-05-14 15:31:42 +03:00
mainProgram = "upsun";
2024-03-27 12:39:40 +03:00
maintainers = with lib.maintainers; [ spk ];
license = lib.licenses.mit;
2024-05-14 15:31:42 +03:00
platforms = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ];
2024-03-27 12:39:40 +03:00
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
};
2024-05-15 11:28:49 +03:00
})