11 versions = lib.importJSON ./versions.json;
13 if stdenvNoCC.hostPlatform.isx86_64 then
15 else if stdenvNoCC.hostPlatform.isAarch64 then
18 throw "Unsupported architecture";
20 if stdenvNoCC.hostPlatform.isLinux then
22 else if stdenvNoCC.hostPlatform.isDarwin then
25 throw "Unsupported os";
26 versionInfo = versions."${os}-${arch}";
27 inherit (versionInfo) hash url;
30 stdenvNoCC.mkDerivation (finalAttrs: {
32 inherit (versions) version;
34 nativeBuildInputs = [ installShellFiles ];
37 src = fetchurl { inherit hash url; };
46 install -Dm755 platform $out/bin/platform
48 installShellCompletion completion/bash/platform.bash \
49 completion/zsh/_platform
55 updateScript = ./update.sh;
56 tests.version = testers.testVersion {
57 inherit (finalAttrs) version;
63 description = "Unified tool for managing your Platform.sh services from the command line";
64 homepage = "https://github.com/platformsh/cli";
65 license = lib.licenses.mit;
66 mainProgram = "platform";
67 maintainers = with lib.maintainers; [
77 sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];