about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/interpreters/gpython/default.nix
blob: b0aae579bf2b535b9db941821ad76e34f5b4f654 (plain) (blame)
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
41
42
43
44
45
46
47
48
{ lib
, buildGoModule
, fetchFromGitHub
, testers
, gpython
}:

buildGoModule rec {
  pname = "gpython";
  version = "0.2.0";

  src = fetchFromGitHub {
    owner = "go-python";
    repo = "gpython";
    rev = "v${version}";
    hash = "sha256-xqwq27u41Jgoh7t9UDyatuBQswr+h3xio5AV/npncHc=";
  };

  vendorHash = "sha256-NXPllEhootdB8m5Wvfy8MW899oQnjWAQj7yCC2oDvqE=";

  subPackages = [
    "."
  ];

  ldflags = [
    "-s"
    "-w"
    "-X=main.version=${version}"
    "-X=main.commit=${src.rev}"
    "-X=main.date=1970-01-01"
  ];

  passthru.tests = {
    version = testers.testVersion {
      package = gpython;
      command = "gpython < /dev/null";
    };
  };

  meta = with lib; {
    description = "A Python interpreter written in Go";
    mainProgram = "gpython";
    homepage = "https://github.com/go-python/gpython";
    changelog = "https://github.com/go-python/gpython/releases/tag/${src.rev}";
    license = licenses.bsd3;
    maintainers = with maintainers; [ figsoda ];
  };
}