lol
1{ lib
2, buildGoModule
3, fetchFromGitHub
4, testers
5, scip
6}:
7
8buildGoModule rec {
9 pname = "scip";
10 version = "0.3.2";
11
12 src = fetchFromGitHub {
13 owner = "sourcegraph";
14 repo = "scip";
15 rev = "v${version}";
16 hash = "sha256-lZ3W2Z69P5QQN+PgF9+Apj/uEXWaTS+5QOg17m1mGPU=";
17 };
18
19 vendorHash = "sha256-3Tq2cexcxHjaH6WIz2hneE1QeBSGoMINBncKbqxODxQ=";
20
21 ldflags = [
22 "-s"
23 "-w"
24 "-X=main.Reproducible=true"
25 ];
26
27 # update documentation to fix broken test
28 postPatch = ''
29 substituteInPlace docs/CLI.md \
30 --replace 0.3.0 0.3.1
31 '';
32
33 passthru.tests = {
34 version = testers.testVersion {
35 package = scip;
36 version = "v${version}";
37 };
38 };
39
40 meta = with lib; {
41 description = "SCIP Code Intelligence Protocol CLI";
42 homepage = "https://github.com/sourcegraph/scip";
43 changelog = "https://github.com/sourcegraph/scip/blob/${src.rev}/CHANGELOG.md";
44 license = licenses.asl20;
45 maintainers = with maintainers; [ figsoda ];
46 };
47}