Files
nixpkgs/pkgs/by-name/ps/pscale/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

58 lines
1.3 KiB
Nix

{
stdenv,
buildGoModule,
fetchFromGitHub,
installShellFiles,
lib,
pscale,
testers,
}:
buildGoModule rec {
pname = "pscale";
version = "0.258.0";
src = fetchFromGitHub {
owner = "planetscale";
repo = "cli";
rev = "v${version}";
sha256 = "sha256-FsDcZcha8jR+jTbZbL/34SDUS/GvyAtuWL2NK0Okofc=";
};
vendorHash = "sha256-bzJydUOC08NLVVwEzJ+ZSC65lI4EKS1gzjTMIN3rukM=";
ldflags = [
"-s"
"-w"
"-X main.version=v${version}"
"-X main.commit=v${version}"
"-X main.date=unknown"
];
nativeBuildInputs = [ installShellFiles ];
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
installShellCompletion --cmd pscale \
--bash <($out/bin/pscale completion bash) \
--fish <($out/bin/pscale completion fish) \
--zsh <($out/bin/pscale completion zsh)
'';
__darwinAllowLocalNetworking = true;
passthru.tests.version = testers.testVersion {
package = pscale;
};
meta = {
description = "CLI for PlanetScale Database";
mainProgram = "pscale";
changelog = "https://github.com/planetscale/cli/releases/tag/v${version}";
homepage = "https://www.planetscale.com/";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [
kashw2
];
};
}