6 common-updater-scripts,
12 stdenvNoCC.mkDerivation (finalAttrs: {
13 pname = "tideways-cli";
16 nativeBuildInputs = [ installShellFiles ];
19 finalAttrs.passthru.sources.${stdenvNoCC.hostPlatform.system}
20 or (throw "Unsupported platform for tideways-cli: ${stdenvNoCC.hostPlatform.system}");
26 cp tideways $out/bin/tideways
27 chmod +x $out/bin/tideways
29 installShellCompletion --cmd tideways \
30 --bash <($out/bin/tideways completion bash) \
31 --zsh <($out/bin/tideways completion zsh) \
32 --fish <($out/bin/tideways completion fish)
39 "x86_64-linux" = fetchurl {
40 url = "https://s3-eu-west-1.amazonaws.com/tideways/cli/${finalAttrs.version}/tideways-cli_linux_amd64-${finalAttrs.version}.tar.gz";
41 hash = "sha256-PoZHmr4kq6A6aTVlo9kbjnRSkLBJ9q/GneHGWoEvraQ=";
43 "aarch64-linux" = fetchurl {
44 url = "https://s3-eu-west-1.amazonaws.com/tideways/cli/${finalAttrs.version}/tideways-cli_linux_arm64-${finalAttrs.version}.tar.gz";
45 hash = "sha256-8r3s9izpi8fR+lSDQ6ZAxGWK2XQxrtp7WgRykRC+pD4=";
47 "x86_64-darwin" = fetchurl {
48 url = "https://s3-eu-west-1.amazonaws.com/tideways/cli/${finalAttrs.version}/tideways-cli_macos_amd64-${finalAttrs.version}.tar.gz";
49 hash = "sha256-D40PF6zgf79NO1K35koZ2gpUeJllF9CpW9DoCQ1uJIU=";
51 "aarch64-darwin" = fetchurl {
52 url = "https://s3-eu-west-1.amazonaws.com/tideways/cli/${finalAttrs.version}/tideways-cli_macos_arm64-${finalAttrs.version}.tar.gz";
53 hash = "sha256-QGkRu0IRUpydLIy0DgtRhLiH0mLZ0UTRCJo1WZeICQQ=";
58 writeShellApplication {
59 name = "update-tideways-cli";
63 common-updater-scripts
66 NEW_VERSION=$(curl --fail -L -s https://tideways.com/profiler/downloads | grep -E 'https://tideways.s3.amazonaws.com/cli/([0-9]+\.[0-9]+\.[0-9]+)/tideways-cli_linux_amd64-\1.tar.gz' | grep -oP 'cli/\K[0-9]+\.[0-9]+\.[0-9]+')
68 if [[ "${finalAttrs.version}" = "$NEW_VERSION" ]]; then
69 echo "The new version same as the old version."
73 for platform in ${lib.escapeShellArgs finalAttrs.meta.platforms}; do
74 update-source-version "tideways-cli" "$NEW_VERSION" --ignore-same-version --source-key="sources.$platform"
78 }/bin/update-tideways-cli";
82 description = "Tideways Profiler CLI";
83 homepage = "https://tideways.com/";
84 sourceProvenance = with sourceTypes; [ binaryNativeCode ];
85 mainProgram = "tideways";
86 license = licenses.unfree;
87 maintainers = with maintainers; [ shyim ];
88 platforms = lib.attrNames finalAttrs.passthru.sources;