nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at fix-function-merge 54 lines 1.6 kB view raw
1{ lib, buildGoModule, fetchFromGitHub, less, more, installShellFiles, testers, jira-cli-go, nix-update-script }: 2 3buildGoModule rec { 4 pname = "jira-cli-go"; 5 version = "1.5.1"; 6 7 src = fetchFromGitHub { 8 owner = "ankitpokhrel"; 9 repo = "jira-cli"; 10 rev = "v${version}"; 11 hash = "sha256-edytj9hB8lDwy3qGSyLudu5G4DSRGKhD0vDoWz5eUgs="; 12 }; 13 14 vendorHash = "sha256-DAdzbANqr0fa4uO8k/yJFoirgbZiKOQhOH8u8d+ncao="; 15 16 ldflags = [ 17 "-s" "-w" 18 "-X github.com/ankitpokhrel/jira-cli/internal/version.GitCommit=${src.rev}" 19 "-X github.com/ankitpokhrel/jira-cli/internal/version.SourceDateEpoch=0" 20 "-X github.com/ankitpokhrel/jira-cli/internal/version.Version=${version}" 21 ]; 22 23 __darwinAllowLocalNetworking = true; 24 25 nativeCheckInputs = [ less more ]; # Tests expect a pager in $PATH 26 27 passthru = { 28 tests.version = testers.testVersion { 29 package = jira-cli-go; 30 command = "jira version"; 31 inherit version; 32 }; 33 updateScript = nix-update-script { }; 34 }; 35 36 nativeBuildInputs = [ installShellFiles ]; 37 postInstall = '' 38 installShellCompletion --cmd jira \ 39 --bash <($out/bin/jira completion bash) \ 40 --zsh <($out/bin/jira completion zsh) 41 42 $out/bin/jira man --generate --output man 43 installManPage man/* 44 ''; 45 46 meta = with lib; { 47 description = "Feature-rich interactive Jira command line"; 48 homepage = "https://github.com/ankitpokhrel/jira-cli"; 49 changelog = "https://github.com/ankitpokhrel/jira-cli/releases/tag/v${version}"; 50 license = licenses.mit; 51 maintainers = with maintainers; [ bryanasdev000 anthonyroussel ]; 52 mainProgram = "jira"; 53 }; 54}