{mosdepth, nimlsp}: upgrade to nim

nim_lk: fix compatiblity with 2.2.8
This commit is contained in:
eveeifyeve
2026-07-02 13:36:59 +10:00
committed by Eveeifyeve
parent 53dc2ea05a
commit 80f829b69a
4 changed files with 20 additions and 13 deletions
-2
View File
@@ -9,8 +9,6 @@ buildNimPackage (finalAttrs: {
pname = "mosdepth";
version = "0.3.13";
requiredNimVersion = 1;
src = fetchFromGitHub {
owner = "brentp";
repo = "mosdepth";
+13
View File
@@ -0,0 +1,13 @@
diff --git a/src/nim_lk.nim b/src/nim_lk.nim
index 09ced9d..45c5ddc 100644
--- a/src/nim_lk.nim
+++ b/src/nim_lk.nim
@@ -573,7 +573,7 @@ proc update(bom: JsonNode; bomRef: string; byName: bool): bool =
let comp = bom.getComponent(bomRef, byName)
assert not comp.isNil
var bomRef = comp{"bom-ref"}.getStr
- assert not bomRef.isNil
+ assert bomRef != ""
var suitableRefFound = false
let extRefs = comp{"externalReferences"}
for extRef in extRefs.elems:
+4
View File
@@ -23,6 +23,10 @@ buildNimSbom (finalAttrs: {
buildInputs = [ openssl ];
nativeBuildInputs = [ makeWrapper ];
patches = [
./nil.patch
];
postFixup = ''
wrapProgram $out/bin/nim_lk \
--suffix PATH : ${
+3 -11
View File
@@ -3,17 +3,9 @@
buildNimPackage,
fetchFromGitHub,
srcOnly,
nim-2_0,
nim-unwrapped-2_0,
nim-unwrapped,
}:
let
buildNimPackage' = buildNimPackage.override {
# Do not build with Nim-2.2.x.
nim2 = nim-2_0;
};
in
buildNimPackage' (finalAttrs: {
buildNimPackage (finalAttrs: {
pname = "nimlsp";
version = "0.4.6";
@@ -40,7 +32,7 @@ buildNimPackage' (finalAttrs: {
nimFlags = [
"--threads:on"
"-d:explicitSourcePath=${srcOnly nim-unwrapped-2_0}"
"-d:explicitSourcePath=${srcOnly nim-unwrapped}"
"-d:tempDir=/tmp"
];