{mosdepth, nimlsp}: upgrade to nim
nim_lk: fix compatiblity with 2.2.8
This commit is contained in:
@@ -9,8 +9,6 @@ buildNimPackage (finalAttrs: {
|
||||
pname = "mosdepth";
|
||||
version = "0.3.13";
|
||||
|
||||
requiredNimVersion = 1;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "brentp";
|
||||
repo = "mosdepth";
|
||||
|
||||
@@ -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:
|
||||
@@ -23,6 +23,10 @@ buildNimSbom (finalAttrs: {
|
||||
buildInputs = [ openssl ];
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
|
||||
patches = [
|
||||
./nil.patch
|
||||
];
|
||||
|
||||
postFixup = ''
|
||||
wrapProgram $out/bin/nim_lk \
|
||||
--suffix PATH : ${
|
||||
|
||||
@@ -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"
|
||||
];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user