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