1{ lib
2, buildGoModule
3, fetchFromGitHub
4, testers
5, gpython
6}:
7
8buildGoModule rec {
9 pname = "gpython";
10 version = "0.2.0";
11
12 src = fetchFromGitHub {
13 owner = "go-python";
14 repo = "gpython";
15 rev = "v${version}";
16 hash = "sha256-xqwq27u41Jgoh7t9UDyatuBQswr+h3xio5AV/npncHc=";
17 };
18
19 vendorHash = "sha256-NXPllEhootdB8m5Wvfy8MW899oQnjWAQj7yCC2oDvqE=";
20
21 subPackages = [
22 "."
23 ];
24
25 ldflags = [
26 "-s"
27 "-w"
28 "-X=main.version=${version}"
29 "-X=main.commit=${src.rev}"
30 "-X=main.date=1970-01-01"
31 ];
32
33 passthru.tests = {
34 version = testers.testVersion {
35 package = gpython;
36 command = "gpython < /dev/null";
37 };
38 };
39
40 meta = with lib; {
41 description = "A Python interpreter written in Go";
42 homepage = "https://github.com/go-python/gpython";
43 changelog = "https://github.com/go-python/gpython/releases/tag/${src.rev}";
44 license = licenses.bsd3;
45 maintainers = with maintainers; [ figsoda ];
46 };
47}