Repository navigation
Expand file tree
/
Copy pathflake.nix
More file actions
80 lines (68 loc) 路 2.22 KB
/
Copy pathflake.nix
File metadata and controls
80 lines (68 loc) 路 2.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
{
description = "jira-cli development environment";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-parts.url = "github:hercules-ci/flake-parts";
};
outputs = inputs @ { flake-parts, ... }:
flake-parts.lib.mkFlake { inherit inputs; } {
systems = [
"x86_64-linux"
"aarch64-linux"
"x86_64-darwin"
"aarch64-darwin"
];
perSystem = { pkgs, lib, ... }: {
packages.default = pkgs.buildGoModule rec {
pname = "jira-cli";
# Latest upstream tag this fork is based on, with -dev suffix to
# mark Nix-built binaries as unreleased. Bump alongside any tag
# update so `jira --version` reports the right base version.
version = "1.7.0-dev";
src = lib.cleanSourceWith {
src = ./.;
filter = path: type:
let baseName = baseNameOf (toString path);
in !(lib.elem baseName [ ".direnv" ".go" ".gocache" "bin" "vendor" "dist" "coverage" ]);
};
vendorHash = "sha256-cl+Sfi9WSPy8qOtB13rRiKtQdDC+HC0+FMKpsWbtU2w=";
subPackages = [ "cmd/jira" ];
env.CGO_ENABLED = "0";
ldflags = [
"-s"
"-w"
"-X github.com/ankitpokhrel/jira-cli/internal/version.Version=${version}"
];
doCheck = false;
meta = {
description = "Feature-rich interactive Jira command line";
homepage = "https://github.com/ankitpokhrel/jira-cli";
license = lib.licenses.mit;
mainProgram = "jira";
platforms = lib.platforms.unix;
};
};
devShells.default = pkgs.mkShell {
packages = with pkgs; [
go_1_25
gopls
gotools
go-tools
golangci-lint
delve
gomodifytags
gotests
impl
govulncheck
];
shellHook = ''
export GOBIN="$PWD/.go/bin"
export GOCACHE="$PWD/.gocache"
mkdir -p "$GOBIN"
export PATH="$GOBIN:$PATH"
echo "go $(go version | awk '{print $3}') dev shell"
'';
};
};
};
}