at 23.11-beta 49 lines 1.1 kB view raw
1{ buildGoModule 2, fetchFromGitHub 3, installShellFiles 4, lib 5, pscale 6, testers 7}: 8 9buildGoModule rec { 10 pname = "pscale"; 11 version = "0.161.0"; 12 13 src = fetchFromGitHub { 14 owner = "planetscale"; 15 repo = "cli"; 16 rev = "v${version}"; 17 sha256 = "sha256-7PzuFhlOlU5uGsJyGOY761JfzqaPkkkftRlYrvUKEoU="; 18 }; 19 20 vendorHash = "sha256-fhYd2C9xY0kQez6+MofimJP+brLvMDFXlW6kDSI4iqA="; 21 22 ldflags = [ 23 "-s" "-w" 24 "-X main.version=v${version}" 25 "-X main.commit=v${version}" 26 "-X main.date=unknown" 27 ]; 28 29 nativeBuildInputs = [ installShellFiles ]; 30 31 postInstall = '' 32 installShellCompletion --cmd pscale \ 33 --bash <($out/bin/pscale completion bash) \ 34 --fish <($out/bin/pscale completion fish) \ 35 --zsh <($out/bin/pscale completion zsh) 36 ''; 37 38 passthru.tests.version = testers.testVersion { 39 package = pscale; 40 }; 41 42 meta = with lib; { 43 description = "The CLI for PlanetScale Database"; 44 changelog = "https://github.com/planetscale/cli/releases/tag/v${version}"; 45 homepage = "https://www.planetscale.com/"; 46 license = licenses.asl20; 47 maintainers = with maintainers; [ pimeys kashw2 ]; 48 }; 49}