chromium,chromedriver: 129.0.6668.91 -> 129.0.6668.100
[NixPkgs.git] / pkgs / by-name / pl / platformsh / package.nix
blob730990f103ff4e0d80d8fecb67d8e38079103bea
2   stdenvNoCC,
3   lib,
4   fetchurl,
5   testers,
6   installShellFiles,
7   platformsh
8 }:
10 let versions = lib.importJSON ./versions.json;
11     arch = if stdenvNoCC.hostPlatform.isx86_64 then "amd64"
12            else if stdenvNoCC.hostPlatform.isAarch64 then "arm64"
13            else throw "Unsupported architecture";
14     os = if stdenvNoCC.hostPlatform.isLinux then "linux"
15          else if stdenvNoCC.hostPlatform.isDarwin then "darwin"
16          else throw "Unsupported os";
17     versionInfo = versions."${os}-${arch}";
18     inherit (versionInfo) hash url;
21 stdenvNoCC.mkDerivation (finalAttrs: {
22   pname = "platformsh";
23   inherit (versions) version;
25   nativeBuildInputs = [ installShellFiles ];
27   # run ./update
28   src = fetchurl { inherit hash url; };
30   dontConfigure = true;
31   dontBuild = true;
33   sourceRoot = ".";
34   installPhase = ''
35     runHook preInstall
37     install -Dm755 platform $out/bin/platform
39     installShellCompletion completion/bash/platform.bash \
40         completion/zsh/_platform
42     runHook postInstall
43   '';
45   passthru = {
46     updateScript = ./update.sh;
47     tests.version = testers.testVersion {
48       inherit (finalAttrs) version;
49       package = platformsh;
50     };
51   };
53   meta = {
54     description = "Unified tool for managing your Platform.sh services from the command line";
55     homepage = "https://github.com/platformsh/cli";
56     license = lib.licenses.mit;
57     mainProgram = "platform";
58     maintainers = with lib.maintainers; [ shyim spk ];
59     platforms = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ];
60     sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
61   };