Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib
2, buildGoModule
3, fetchFromGitHub
4, testers
5, scip
6}:
7
8buildGoModule rec {
9 pname = "scip";
10 version = "0.2.3";
11
12 src = fetchFromGitHub {
13 owner = "sourcegraph";
14 repo = "scip";
15 rev = "v${version}";
16 hash = "sha256-0ErEA44vRRntWxajUKiQXqaKvQtqCPPXnI/sBktQyIo=";
17 };
18
19 vendorHash = "sha256-T0NYucDVBnTxROVYXlccOvHX74Cs6czXL/fy14I8MZc=";
20
21 ldflags = [
22 "-s"
23 "-w"
24 "-X=main.Reproducible=true"
25 ];
26
27 postInstall = ''
28 mv $out/bin/{cmd,scip}
29 '';
30
31 passthru.tests = {
32 version = testers.testVersion {
33 package = scip;
34 version = "v${version}";
35 };
36 };
37
38 meta = with lib; {
39 description = "SCIP Code Intelligence Protocol CLI";
40 homepage = "https://github.com/sourcegraph/scip";
41 changelog = "https://github.com/sourcegraph/scip/blob/${src.rev}/CHANGELOG.md";
42 license = licenses.asl20;
43 maintainers = with maintainers; [ figsoda ];
44 };
45}