scip: 0.5.1 -> 0.6.1 (#448358)

This commit is contained in:
Gaétan Lepage
2025-11-07 12:42:21 +00:00
committed by GitHub
+34 -23
View File
@@ -1,49 +1,60 @@
{
lib,
buildGoModule,
stdenv,
buildGo124Module,
fetchFromGitHub,
testers,
scip,
libredirect,
iana-etc,
versionCheckHook,
}:
buildGoModule rec {
buildGo124Module (finalAttrs: {
pname = "scip";
version = "0.5.1";
version = "0.6.1";
src = fetchFromGitHub {
owner = "sourcegraph";
repo = "scip";
rev = "v${version}";
hash = "sha256-UXa5lMFenynHRIvA4MOXkjMVd705LBWs372s3MFAc+8=";
tag = "v${finalAttrs.version}";
hash = "sha256-l68xhOMgwt+ySChk7BCyklcuC6r51GgobAg3lRLvOCU=";
};
vendorHash = "sha256-6vx3Dt0ZNR0rY5bEUF5X1hHj/gv21920bhfd+JJ9bYk=";
vendorHash = "sha256-8HgeG/SXkM7ptOwKSi/PUH3VySxFqqoIpXI7bZtbO4A=";
ldflags = [
"-s"
"-w"
"-X=main.Reproducible=true"
];
# update documentation to fix broken test
postPatch = ''
substituteInPlace docs/CLI.md \
--replace 0.3.0 0.3.1
nativeCheckInputs = lib.optionals stdenv.hostPlatform.isDarwin [ libredirect.hook ];
checkFlags =
let
skippedTests = [
"TestParseCompat" # could not locate sample indexes directory starting from parents of working directory
"TestParseSymbol_ZeroAllocationsIfMemoryAvailable"
];
in
[ "-skip=^${builtins.concatStringsSep "$|^" skippedTests}$" ];
__darwinAllowLocalNetworking = true;
preCheck = lib.optionalString stdenv.hostPlatform.isDarwin ''
export NIX_REDIRECTS=/etc/protocols=${iana-etc}/etc/protocols:/etc/services=${iana-etc}/etc/services
'';
passthru.tests = {
version = testers.testVersion {
package = scip;
version = "v${version}";
};
};
doInstallCheck = stdenv.hostPlatform.isLinux;
meta = with lib; {
nativeInstallCheckInputs = [ versionCheckHook ];
versionCheckProgramArg = "--version";
meta = {
description = "SCIP Code Intelligence Protocol CLI";
mainProgram = "scip";
homepage = "https://github.com/sourcegraph/scip";
changelog = "https://github.com/sourcegraph/scip/blob/${src.rev}/CHANGELOG.md";
license = licenses.asl20;
changelog = "https://github.com/sourcegraph/scip/blob/${finalAttrs.src.rev}/CHANGELOG.md";
license = lib.licenses.asl20;
maintainers = [ ];
};
}
})