git.iko.soy/typeable/nixpkgs
on master help sign in
ncdns: init at 0.0.10.3
commit5ec0bd76496be59922ef69b4e4c1f6fa94dd0c82 authorrnhmjoj <rnhmjoj@inventati.org> dateThu 4 Jun 2020, 22:49 (6 years ago) parentd6d07f2
4 files changed+376
pkgs/servers/dns/ncdns/default.nix+38 pkgs/servers/dns/ncdns/deps.nix+309 pkgs/servers/dns/ncdns/fix-tpl-path.nix+27 pkgs/top-level/all-packages.nix+2
pkgs/servers/dns/ncdns/default.nixnew file+38
@@ -0,0 +1,38 @@
1+{ lib, git, buildGoPackage, fetchFromGitHub, libcap }:
2+
3+buildGoPackage rec {
4+ pname = "ncdns";
5+ version = "0.0.10.3";
6+
7+ goPackagePath = "github.com/namecoin/ncdns";
8+ goDeps = ./deps.nix;
9+
10+ src = fetchFromGitHub {
11+ owner = "namecoin";
12+ repo = "ncdns";
13+ rev = "v${version}";
14+ sha256 = "12q5al48mkjhgyk7z5wyklzzrdbcqhwxl79axa4gh9ld75prghbq";
15+ };
16+
17+ patches = [ ./fix-tpl-path.nix ];
18+
19+ buildInputs = [ libcap ];
20+
21+ preBuild = ''
22+ go generate github.com/namecoin/x509-signature-splice/...
23+ '';
24+
25+ postInstall = ''
26+ mkdir -p "$out/share"
27+ cp -r "$src/_doc" "$out/share/doc"
28+ cp -r "$src/_tpl" "$out/share/tpl"
29+ '';
30+
31+ meta = with lib; {
32+ description = "Namecoin to DNS bridge daemon";
33+ homepage = "https://github.com/namecoin/ncdns";
34+ license = licenses.gpl3Plus;
35+ platforms = platforms.all;
36+ maintainers = with maintainers; [ rnhmjoj ];
37+ };
38+}
pkgs/servers/dns/ncdns/deps.nixnew file+309
@@ -0,0 +1,309 @@
1+# This file was generated by https://github.com/kamilchm/go2nix v1.3.0
2+[
3+ {
4+ goPackagePath = "github.com/BurntSushi/toml";
5+ fetch = {
6+ type = "git";
7+ url = "https://github.com/BurntSushi/toml";
8+ rev = "3012a1dbe2e4bd1391d42b32f0577cb7bbc7f005";
9+ sha256 = "1fjdwwfzyzllgiwydknf1pwjvy49qxfsczqx5gz3y0izs7as99j6";
10+ };
11+ }
12+ {
13+ goPackagePath = "github.com/alecthomas/template";
14+ fetch = {
15+ type = "git";
16+ url = "https://github.com/alecthomas/template";
17+ rev = "fb15b899a75114aa79cc930e33c46b577cc664b1";
18+ sha256 = "1vlasv4dgycydh5wx6jdcvz40zdv90zz1h7836z7lhsi2ymvii26";
19+ };
20+ }
21+ {
22+ goPackagePath = "github.com/alecthomas/units";
23+ fetch = {
24+ type = "git";
25+ url = "https://github.com/alecthomas/units";
26+ rev = "f65c72e2690dc4b403c8bd637baf4611cd4c069b";
27+ sha256 = "04jyqm7m3m01ppfy1f9xk4qvrwvs78q9zml6llyf2b3v5k6b2bbc";
28+ };
29+ }
30+ {
31+ goPackagePath = "github.com/btcsuite/btcd";
32+ fetch = {
33+ type = "git";
34+ url = "https://github.com/btcsuite/btcd";
35+ rev = "9f0179fd2c46caba343b6515602cf37172f14d5f";
36+ sha256 = "0cvpjsxlyzm04pwzi7nj43k9h5wfxj07jdc49qxsav5323v1nvka";
37+ };
38+ }
39+ {
40+ goPackagePath = "github.com/btcsuite/btclog";
41+ fetch = {
42+ type = "git";
43+ url = "https://github.com/btcsuite/btclog";
44+ rev = "84c8d2346e9fc8c7b947e243b9c24e6df9fd206a";
45+ sha256 = "02dl46wcnfpg9sqvg0ipipkpnd7lrf4fnvb9zy56jqa7mfcwc7wk";
46+ };
47+ }
48+ {
49+ goPackagePath = "github.com/btcsuite/btcutil";
50+ fetch = {
51+ type = "git";
52+ url = "https://github.com/btcsuite/btcutil";
53+ rev = "b2bf7f89d674a3702182b7e15f52807896051af3";
54+ sha256 = "0wwykb4cbq8xj2mls2mxma5vaahdgdy3vqw1r2fi4wyj0yr4kyw9";
55+ };
56+ }
57+ {
58+ goPackagePath = "github.com/btcsuite/go-socks";
59+ fetch = {
60+ type = "git";
61+ url = "https://github.com/btcsuite/go-socks";
62+ rev = "4720035b7bfd2a9bb130b1c184f8bbe41b6f0d0f";
63+ sha256 = "18cv2icj059lq4s99p6yh91hlas5f2gi3f1p4c10sjgwrs933d7b";
64+ };
65+ }
66+ {
67+ goPackagePath = "github.com/btcsuite/websocket";
68+ fetch = {
69+ type = "git";
70+ url = "https://github.com/btcsuite/websocket";
71+ rev = "31079b6807923eb23992c421b114992b95131b55";
72+ sha256 = "0xpkf257ml6fpfdgv7hxxc41n0d5yxxm3njm50qpzp7j71l9cjwa";
73+ };
74+ }
75+ {
76+ goPackagePath = "github.com/coreos/go-systemd";
77+ fetch = {
78+ type = "git";
79+ url = "https://github.com/coreos/go-systemd";
80+ rev = "b51e752dd1c9c618846f8bc5b95ab524bd7b11c2";
81+ sha256 = "127dj1iwp69yj74nwh9ckgc0mkk1mv4yzbxmbdxix1r7j6q35z3j";
82+ };
83+ }
84+ {
85+ goPackagePath = "github.com/golang/groupcache";
86+ fetch = {
87+ type = "git";
88+ url = "https://github.com/golang/groupcache";
89+ rev = "8c9f03a8e57eb486e42badaed3fb287da51807ba";
90+ sha256 = "0vjjr79r32icjzlb05wn02k59av7jx0rn1jijml8r4whlg7dnkfh";
91+ };
92+ }
93+ {
94+ goPackagePath = "github.com/hlandau/buildinfo";
95+ fetch = {
96+ type = "git";
97+ url = "https://github.com/hlandau/buildinfo";
98+ rev = "337a29b5499734e584d4630ce535af64c5fe7813";
99+ sha256 = "1kq3r1i4rr9bcvj5yg8w1l95f6sfc3kn6kgcdmlh5i3j9w2sram8";
100+ };
101+ }
102+ {
103+ goPackagePath = "github.com/hlandau/degoutils";
104+ fetch = {
105+ type = "git";
106+ url = "https://github.com/hlandau/degoutils";
107+ rev = "8fa2440b63444dad556d76366f1c3ee070c8a577";
108+ sha256 = "1yj39jbrk3xx3cyl8f4asakc74lsl0brasi25xjf6219pg69q0iy";
109+ };
110+ }
111+ {
112+ goPackagePath = "github.com/hlandau/dexlogconfig";
113+ fetch = {
114+ type = "git";
115+ url = "https://github.com/hlandau/dexlogconfig";
116+ rev = "244f29bd260884993b176cd14ef2f7631f6f3c18";
117+ sha256 = "1d01ghx6xawj3nk3lpk51wbbpxdnc9vzvijvlayvp7cxgsacslbc";
118+ };
119+ }
120+ {
121+ goPackagePath = "github.com/hlandau/xlog";
122+ fetch = {
123+ type = "git";
124+ url = "https://github.com/hlandau/xlog";
125+ rev = "197ef798aed28e08ed3e176e678fda81be993a31";
126+ sha256 = "08rjlqnjbfgpz5rbjq89l7y5vyhk99ivr928sqdi5gnqznbqs4m8";
127+ };
128+ }
129+ {
130+ goPackagePath = "github.com/kr/pretty";
131+ fetch = {
132+ type = "git";
133+ url = "https://github.com/kr/pretty";
134+ rev = "4e0886370c3a67530192c6a238cff68f56c141b0";
135+ sha256 = "1ywbfzz1h3a3qd8rpkiqwi1dm4w8ls9ijb4x1b7567grns9f0vnp";
136+ };
137+ }
138+ {
139+ goPackagePath = "github.com/kr/text";
140+ fetch = {
141+ type = "git";
142+ url = "https://github.com/kr/text";
143+ rev = "702c74938df48b97370179f33ce2107bd7ff3b3e";
144+ sha256 = "0hf58ypz6rxsw6nx3i856whir9lvy4sdx946wbw1nfaf2rdmr9vx";
145+ };
146+ }
147+ {
148+ goPackagePath = "github.com/mattn/go-isatty";
149+ fetch = {
150+ type = "git";
151+ url = "https://github.com/mattn/go-isatty";
152+ rev = "cb30d6282491c185f77d9bec5d25de1bb61a06bc";
153+ sha256 = "0v59mv94acd2m72q8adhigxkx1vn38l5h0d8hp0nxga2v9f3v8kd";
154+ };
155+ }
156+ {
157+ goPackagePath = "github.com/miekg/dns";
158+ fetch = {
159+ type = "git";
160+ url = "https://github.com/miekg/dns";
161+ rev = "203ad2480beb9330454efc215d21f16c607e8174";
162+ sha256 = "12i2l79whv7a8c27f1dvq4wqikx4d0l30r1ja68zfgrgik6vryxq";
163+ };
164+ }
165+ {
166+ goPackagePath = "github.com/namecoin/btcd";
167+ fetch = {
168+ type = "git";
169+ url = "https://github.com/namecoin/btcd";
170+ rev = "69a10543311fa68737d0a77b4cd045b0b0abfb75";
171+ sha256 = "1zbfigs3hrjhdwp19877lpgivdcz3k80149nxdmxlmp03xcswcqy";
172+ };
173+ }
174+ {
175+ goPackagePath = "github.com/namecoin/ncbtcjson";
176+ fetch = {
177+ type = "git";
178+ url = "https://github.com/namecoin/ncbtcjson";
179+ rev = "fa221af062c70f802db6ed66e1546cc4a41ec277";
180+ sha256 = "1fmz5aylsji27vj5f3f3gg9xj99735gh5prvcfz0gmk68v1mnr4i";
181+ };
182+ }
183+ {
184+ goPackagePath = "github.com/namecoin/ncrpcclient";
185+ fetch = {
186+ type = "git";
187+ url = "https://github.com/namecoin/ncrpcclient";
188+ rev = "858e1a5acd8b2da56462f50323633cdf2fe80977";
189+ sha256 = "0pj951wm6fdkk2yv4bxaxka52i7rb6w3fs9ah3fy7p8wchr4smjx";
190+ };
191+ }
192+ {
193+ goPackagePath = "github.com/namecoin/tlsrestrictnss";
194+ fetch = {
195+ type = "git";
196+ url = "https://github.com/namecoin/tlsrestrictnss";
197+ rev = "945a9f3d995fcb175fd0b19549e21a3e87ba8c13";
198+ sha256 = "18qphkqnjw3bwflkyyrddyzgwscs37j7y6ynm9g78bqb5skviqqy";
199+ };
200+ }
201+ {
202+ goPackagePath = "github.com/namecoin/x509-signature-splice";
203+ fetch = {
204+ type = "git";
205+ url = "https://github.com/namecoin/x509-signature-splice";
206+ rev = "d8b4bf2df701c55239a9fe82bb1e7bea10e30599";
207+ sha256 = "0jlj4gb60s7b69d8yx6ljhxgvqgjz01n0h59fswblw09wfba8c4j";
208+ };
209+ }
210+ {
211+ goPackagePath = "github.com/ogier/pflag";
212+ fetch = {
213+ type = "git";
214+ url = "https://github.com/ogier/pflag";
215+ rev = "45c278ab3607870051a2ea9040bb85fcb8557481";
216+ sha256 = "0620v75wppfd84d95n312wpngcb73cph4q3ivs1h0waljfnsrd5l";
217+ };
218+ }
219+ {
220+ goPackagePath = "github.com/shiena/ansicolor";
221+ fetch = {
222+ type = "git";
223+ url = "https://github.com/shiena/ansicolor";
224+ rev = "a422bbe96644373c5753384a59d678f7d261ff10";
225+ sha256 = "1dcn8a9z6a5dxa2m3fkppnajcls8lanbl38qggkf646yi5qsk1hc";
226+ };
227+ }
228+ {
229+ goPackagePath = "golang.org/x/crypto";
230+ fetch = {
231+ type = "git";
232+ url = "https://go.googlesource.com/crypto";
233+ rev = "279210d13fedf5be6d476bad5df6a015042bb905";
234+ sha256 = "0syi72jba84nn1z89bqpcv94wjvzj71dwg1pj30xrcixcz1zsg26";
235+ };
236+ }
237+ {
238+ goPackagePath = "golang.org/x/net";
239+ fetch = {
240+ type = "git";
241+ url = "https://go.googlesource.com/net";
242+ rev = "627f9648deb96c27737b83199d44bb5c1010cbcf";
243+ sha256 = "0ziz7i9mhz6dy2f58dsa83flkk165w1cnazm7yksql5i9m7x099z";
244+ };
245+ }
246+ {
247+ goPackagePath = "golang.org/x/sys";
248+ fetch = {
249+ type = "git";
250+ url = "https://go.googlesource.com/sys";
251+ rev = "6fdc65e7d9800cc59998e8ac0d9406a20ff5f399";
252+ sha256 = "0al5gzij4qkrp11i1h8j7288pg6y716zyh2v0886pv2knha7gjvj";
253+ };
254+ }
255+ {
256+ goPackagePath = "gopkg.in/alecthomas/kingpin.v2";
257+ fetch = {
258+ type = "git";
259+ url = "https://gopkg.in/alecthomas/kingpin.v2";
260+ rev = "947dcec5ba9c011838740e680966fd7087a71d0d";
261+ sha256 = "0mndnv3hdngr3bxp7yxfd47cas4prv98sqw534mx7vp38gd88n5r";
262+ };
263+ }
264+ {
265+ goPackagePath = "gopkg.in/hlandau/configurable.v1";
266+ fetch = {
267+ type = "git";
268+ url = "https://gopkg.in/hlandau/configurable.v1";
269+ rev = "41496864a1fe3e0fef2973f22372b755d2897402";
270+ sha256 = "0i9jbdvi8rz12xsrzzbfxg5lwsqakjcmccsa5a32asmv26k5byqa";
271+ };
272+ }
273+ {
274+ goPackagePath = "gopkg.in/hlandau/easyconfig.v1";
275+ fetch = {
276+ type = "git";
277+ url = "https://gopkg.in/hlandau/easyconfig.v1";
278+ rev = "c31249162931b4963bbe6e501cccb60d23271a3f";
279+ sha256 = "1v8j1pyzcfj1l4pmb1c6mszci6xzc4agdam2kq79kyvbsvbbw9dc";
280+ };
281+ }
282+ {
283+ goPackagePath = "gopkg.in/hlandau/madns.v2";
284+ fetch = {
285+ type = "git";
286+ url = "https://gopkg.in/hlandau/madns.v2";
287+ rev = "26979b3e4b5aa3e0bd53cf0a014f9eaf43b578e3";
288+ sha256 = "09r4m4mqdgd7hvxyvss9m64lq0kk8nylnq2bgnkrclgzpi87fmmb";
289+ };
290+ }
291+ {
292+ goPackagePath = "gopkg.in/hlandau/service.v2";
293+ fetch = {
294+ type = "git";
295+ url = "https://gopkg.in/hlandau/service.v2";
296+ rev = "b64b3467ebd16f64faec1640c25e318efc0c0d7b";
297+ sha256 = "0lpx88f46ylx9lf6jgwcjgklll1pc1mlakrywpa0wzhjj7a4jinc";
298+ };
299+ }
300+ {
301+ goPackagePath = "gopkg.in/hlandau/svcutils.v1";
302+ fetch = {
303+ type = "git";
304+ url = "https://gopkg.in/hlandau/svcutils.v1";
305+ rev = "c25dac49e50cbbcbef8c81b089f56156f4067729";
306+ sha256 = "12b6p71mk33r44d71xizjq82fls0ykfwfl5gnmckbgpxms4bj2xf";
307+ };
308+ }
309+]
pkgs/servers/dns/ncdns/fix-tpl-path.nixnew file+27
@@ -0,0 +1,27 @@
1+This sets a default value for the tpl directory that works for Nixpkgs.
2+
3+diff --git a/server/web.go b/server/web.go
4+index d024a42..0522d02 100644
5+--- a/server/web.go
6++++ b/server/web.go
7+@@ -10,6 +10,7 @@ import "path/filepath"
8+ import "time"
9+ import "strings"
10+ import "fmt"
11++import "os"
12+
13+ var layoutTpl *template.Template
14+ var mainPageTpl *template.Template
15+@@ -44,7 +45,11 @@ func deriveTemplate(filename string) (*template.Template, error) {
16+ }
17+
18+ func (s *Server) tplFilename(filename string) string {
19+- td := filepath.Join(s.cfg.ConfigDir, "..", "tpl")
20++ ex, err := os.Executable()
21++ if err != nil {
22++ panic(err)
23++ }
24++ td := filepath.Join(filepath.Dir(ex), "..", "share", "tpl")
25+ if s.cfg.TplPath != "" {
26+ td = s.cfg.TplPath
27+ }
pkgs/top-level/all-packages.nix+2
@@ -15866,6 +15866,8 @@ in
1586615866
1586715867 unit = callPackage ../servers/http/unit { };
1586815868
15869+ ncdns = callPackage ../servers/dns/ncdns { };
15870+
1586915871 nginx = nginxStable;
1587015872
1587115873 nginxStable = callPackage ../servers/http/nginx/stable.nix {