blob: 314d3796ac84cc65f2deddd47623ea7a5c8924cc (
plain)
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
|
final: prev: {
fast-cli = prev.buildGoModule rec {
pname = "fast-cli";
version = "0.2.10";
src = prev.fetchFromGitHub {
owner = "gesquive";
repo = pname;
rev = "v${version}";
hash = "sha256-j7/3Llc3jTeJGpOH3Aexm9qcNscuk0mbi4ZCCyzC3+s=";
};
vendorSha256 = "sha256-XM/5kUau0JBMxN0UpX6QNI31i8/+HNFvgFUFtlJsBh0=";
preBuild = let
goMod = prev.writeText "go.mod" ''
module github.com/gesquive/fast-cli
go 1.17
require (
github.com/dustin/go-humanize v0.0.0-20170228161531-259d2a102b87
github.com/fatih/color v1.4.1
github.com/gesquive/cli v0.2.0
github.com/inconshreveable/mousetrap v1.0.0
github.com/mattn/go-colorable v0.0.8-0.20170210172801-5411d3eea597
github.com/mattn/go-isatty v0.0.2-0.20170307163044-57fdcb988a5c
github.com/spf13/cobra v0.0.0-20170531045452-8d4ce3549a0b
github.com/spf13/pflag v1.0.0
golang.org/x/sys v0.0.0-20170213225739-e24f485414ae
)
'';
in ''
install -v -m 0644 ${goMod} ./go.mod
'';
ldflags = [
"-X main.version=${version}"
];
};
}
|