tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
0
fork
atom
lol
0
fork
atom
overview
issues
pulls
pipelines
jid: Use buildGoModule
Aaron Jheng
3 years ago
ef5dc1f9
17c86704
+95
-81
3 changed files
expand all
collapse all
unified
split
pkgs
development
tools
jid
default.nix
deps.nix
go-mod.patch
+16
-6
pkgs/development/tools/jid/default.nix
reviewed
···
1
1
-
{ lib, buildGoPackage, fetchFromGitHub }:
1
1
+
{ lib, buildGoModule, fetchFromGitHub, testers, jid }:
2
2
3
3
-
buildGoPackage rec {
3
3
+
buildGoModule rec {
4
4
pname = "jid";
5
5
version = "0.7.6";
6
6
-
7
7
-
goPackagePath = "github.com/simeji/jid";
8
6
9
7
src = fetchFromGitHub {
10
8
owner = "simeji";
11
9
repo = "jid";
12
10
rev = "v${version}";
13
13
-
sha256 = "15fgi7cpq5bg2lnpr7rip359xwj2kvlj6j2qzi837c26adnw973x";
11
11
+
hash = "sha256-fZzEbVNGsDNQ/FhII+meQvKeyrgxn3wtFW8VfNmJz5U=";
14
12
};
15
13
16
16
-
goDeps = ./deps.nix;
14
14
+
vendorHash = "sha256-Lq8ouTjPsGhqDwrCMpqkSU7FEGszYwAkwl92vAEZ68w=";
15
15
+
16
16
+
patches = [
17
17
+
# Run go mod tidy
18
18
+
./go-mod.patch
19
19
+
];
20
20
+
21
21
+
ldflags = [ "-s" "-w" ];
22
22
+
23
23
+
passthru.tests.version = testers.testVersion {
24
24
+
package = jid;
25
25
+
version = "v${version}";
26
26
+
};
17
27
18
28
meta = {
19
29
description = "A command-line tool to incrementally drill down JSON";
-75
pkgs/development/tools/jid/deps.nix
reviewed
···
1
1
-
# file generated from go.mod using vgo2nix (https://github.com/adisbladis/vgo2nix)
2
2
-
[
3
3
-
{
4
4
-
goPackagePath = "github.com/bitly/go-simplejson";
5
5
-
fetch = {
6
6
-
type = "git";
7
7
-
url = "https://github.com/bitly/go-simplejson";
8
8
-
rev = "v0.5.0";
9
9
-
sha256 = "0n9f9dz1jn1jx86d48569nznpjn9fmq3knn7r65xpy7jhih284jj";
10
10
-
};
11
11
-
}
12
12
-
{
13
13
-
goPackagePath = "github.com/fatih/color";
14
14
-
fetch = {
15
15
-
type = "git";
16
16
-
url = "https://github.com/fatih/color";
17
17
-
rev = "v1.7.0";
18
18
-
sha256 = "0v8msvg38r8d1iiq2i5r4xyfx0invhc941kjrsg5gzwvagv55inv";
19
19
-
};
20
20
-
}
21
21
-
{
22
22
-
goPackagePath = "github.com/mattn/go-colorable";
23
23
-
fetch = {
24
24
-
type = "git";
25
25
-
url = "https://github.com/mattn/go-colorable";
26
26
-
rev = "v0.0.9";
27
27
-
sha256 = "1nwjmsppsjicr7anq8na6md7b1z84l9ppnlr045hhxjvbkqwalvx";
28
28
-
};
29
29
-
}
30
30
-
{
31
31
-
goPackagePath = "github.com/mattn/go-isatty";
32
32
-
fetch = {
33
33
-
type = "git";
34
34
-
url = "https://github.com/mattn/go-isatty";
35
35
-
rev = "v0.0.4";
36
36
-
sha256 = "0zs92j2cqaw9j8qx1sdxpv3ap0rgbs0vrvi72m40mg8aa36gd39w";
37
37
-
};
38
38
-
}
39
39
-
{
40
40
-
goPackagePath = "github.com/mattn/go-runewidth";
41
41
-
fetch = {
42
42
-
type = "git";
43
43
-
url = "https://github.com/mattn/go-runewidth";
44
44
-
rev = "v0.0.4";
45
45
-
sha256 = "00b3ssm7wiqln3k54z2wcnxr3k3c7m1ybyhb9h8ixzbzspld0qzs";
46
46
-
};
47
47
-
}
48
48
-
{
49
49
-
goPackagePath = "github.com/nsf/termbox-go";
50
50
-
fetch = {
51
51
-
type = "git";
52
52
-
url = "https://github.com/nsf/termbox-go";
53
53
-
rev = "60ab7e3d12ed";
54
54
-
sha256 = "040064fh7wzdmv8flw6svi007hiqs1cjk1a3k3gpg7gii3npifsl";
55
55
-
};
56
56
-
}
57
57
-
{
58
58
-
goPackagePath = "github.com/nwidger/jsoncolor";
59
59
-
fetch = {
60
60
-
type = "git";
61
61
-
url = "https://github.com/nwidger/jsoncolor";
62
62
-
rev = "75a6de4340e5";
63
63
-
sha256 = "0aiv42xijrqgrxfx6pfyrndpwqv8i1qwsk190jdczyjxlnki2nki";
64
64
-
};
65
65
-
}
66
66
-
{
67
67
-
goPackagePath = "github.com/pkg/errors";
68
68
-
fetch = {
69
69
-
type = "git";
70
70
-
url = "https://github.com/pkg/errors";
71
71
-
rev = "v0.8.0";
72
72
-
sha256 = "001i6n71ghp2l6kdl3qq1v2vmghcz3kicv9a5wgcihrzigm75pp5";
73
73
-
};
74
74
-
}
75
75
-
]
+79
pkgs/development/tools/jid/go-mod.patch
reviewed
···
1
1
+
diff --git a/go.mod b/go.mod
2
2
+
index d26c293..3276f36 100644
3
3
+
--- a/go.mod
4
4
+
+++ b/go.mod
5
5
+
@@ -1,12 +1,24 @@
6
6
+
module github.com/simeji/jid
7
7
+
8
8
+
+go 1.19
9
9
+
+
10
10
+
require (
11
11
+
github.com/bitly/go-simplejson v0.5.0
12
12
+
- github.com/fatih/color v1.7.0 // indirect
13
13
+
- github.com/mattn/go-colorable v0.0.9 // indirect
14
14
+
- github.com/mattn/go-isatty v0.0.4 // indirect
15
15
+
github.com/mattn/go-runewidth v0.0.4
16
16
+
github.com/nsf/termbox-go v0.0.0-20181027232701-60ab7e3d12ed
17
17
+
github.com/nwidger/jsoncolor v0.0.0-20170215171346-75a6de4340e5
18
18
+
github.com/pkg/errors v0.8.0
19
19
+
+ github.com/stretchr/testify v1.8.2
20
20
+
+)
21
21
+
+
22
22
+
+require (
23
23
+
+ github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869 // indirect
24
24
+
+ github.com/davecgh/go-spew v1.1.1 // indirect
25
25
+
+ github.com/fatih/color v1.7.0 // indirect
26
26
+
+ github.com/kr/pretty v0.3.1 // indirect
27
27
+
+ github.com/mattn/go-colorable v0.0.9 // indirect
28
28
+
+ github.com/mattn/go-isatty v0.0.4 // indirect
29
29
+
+ github.com/pmezard/go-difflib v1.0.0 // indirect
30
30
+
+ golang.org/x/sys v0.5.0 // indirect
31
31
+
+ gopkg.in/yaml.v3 v3.0.1 // indirect
32
32
+
)
33
33
+
diff --git a/go.sum b/go.sum
34
34
+
index 2fb379f..07d786d 100644
35
35
+
--- a/go.sum
36
36
+
+++ b/go.sum
37
37
+
@@ -1,7 +1,17 @@
38
38
+
github.com/bitly/go-simplejson v0.5.0 h1:6IH+V8/tVMab511d5bn4M7EwGXZf9Hj6i2xSwkNEM+Y=
39
39
+
github.com/bitly/go-simplejson v0.5.0/go.mod h1:cXHtHw4XUPsvGaxgjIAn8PhEWG9NfngEKAMDJEczWVA=
40
40
+
+github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869 h1:DDGfHa7BWjL4YnC6+E63dPcxHo2sUxDIu8g3QgEJdRY=
41
41
+
+github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869/go.mod h1:Ekp36dRnpXw/yCqJaO+ZrUyxD+3VXMFFr56k5XYrpB4=
42
42
+
+github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
43
43
+
+github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
44
44
+
+github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
45
45
+
+github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
46
46
+
github.com/fatih/color v1.7.0 h1:DkWD4oS2D8LGGgTQ6IvwJJXSL5Vp2ffcQg58nFV38Ys=
47
47
+
github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4=
48
48
+
+github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
49
49
+
+github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk=
50
50
+
+github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
51
51
+
+github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
52
52
+
github.com/mattn/go-colorable v0.0.9 h1:UVL0vNpWh04HeJXV0KLcaT7r06gOH2l4OW6ddYRUIY4=
53
53
+
github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU=
54
54
+
github.com/mattn/go-isatty v0.0.4 h1:bnP0vzxcAdeI1zdubAl5PjU6zsERjGZb7raWodagDYs=
55
55
+
@@ -12,5 +22,24 @@ github.com/nsf/termbox-go v0.0.0-20181027232701-60ab7e3d12ed h1:bAVGG6B+R5qpSylr
56
56
+
github.com/nsf/termbox-go v0.0.0-20181027232701-60ab7e3d12ed/go.mod h1:IuKpRQcYE1Tfu+oAQqaLisqDeXgjyyltCfsaoYN18NQ=
57
57
+
github.com/nwidger/jsoncolor v0.0.0-20170215171346-75a6de4340e5 h1:d+C3xJdxZT7wNlxqEwbXn3R355CwAhYBL9raVNfSnK0=
58
58
+
github.com/nwidger/jsoncolor v0.0.0-20170215171346-75a6de4340e5/go.mod h1:GYFm0zZgTNeoK1QxuIofRDasy2ibmaJZhZLzwsMXUF4=
59
59
+
+github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA=
60
60
+
github.com/pkg/errors v0.8.0 h1:WdK/asTD0HN+q6hsWO3/vpuAkAr+tw6aNJNDFFf0+qw=
61
61
+
github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
62
62
+
+github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
63
63
+
+github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
64
64
+
+github.com/rogpeppe/go-internal v1.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZVejAe8=
65
65
+
+github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs=
66
66
+
+github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
67
67
+
+github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
68
68
+
+github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
69
69
+
+github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
70
70
+
+github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
71
71
+
+github.com/stretchr/testify v1.8.2 h1:+h33VjcLVPDHtOdpUCuF+7gSuG3yGIftsP1YvFihtJ8=
72
72
+
+github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
73
73
+
+golang.org/x/sys v0.5.0 h1:MUK/U/4lj1t1oPg0HfuXDN/Z1wv31ZJ/YcPiGccS4DU=
74
74
+
+golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
75
75
+
+gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
76
76
+
+gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
77
77
+
+gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
78
78
+
+gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
79
79
+
+gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=