Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / interpreters / gpython / default.nix
blob8bb432e839ea631cf9072fff30bccc2061874a25
1 { lib
2 , buildGoModule
3 , fetchFromGitHub
4 , testers
5 , gpython
6 }:
8 buildGoModule rec {
9   pname = "gpython";
10   version = "0.2.0";
12   src = fetchFromGitHub {
13     owner = "go-python";
14     repo = "gpython";
15     rev = "v${version}";
16     hash = "sha256-xqwq27u41Jgoh7t9UDyatuBQswr+h3xio5AV/npncHc=";
17   };
19   vendorHash = "sha256-NXPllEhootdB8m5Wvfy8MW899oQnjWAQj7yCC2oDvqE=";
21   subPackages = [
22     "."
23   ];
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   ];
33   passthru.tests = {
34     version = testers.testVersion {
35       package = gpython;
36       command = "gpython < /dev/null";
37     };
38   };
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   };