nimlsp: convert to buildNimPackage
This commit is contained in:
parent
724bde1acf
commit
766671c7fd
4 changed files with 31 additions and 26 deletions
|
@ -0,0 +1,8 @@
|
||||||
|
{ fetchFromGitHub }:
|
||||||
|
|
||||||
|
fetchFromGitHub {
|
||||||
|
owner = "krux02";
|
||||||
|
repo = "ast-pattern-matching";
|
||||||
|
rev = "87f7d163421af5a4f5e5cb6da7b93278e6897e96";
|
||||||
|
sha256 = "19mb5bb6riia8380p5dpc3q0vwgrj958dd6p7vw8vkvwiqrzg6zq";
|
||||||
|
}
|
8
pkgs/development/nim-packages/jsonschema/default.nix
Normal file
8
pkgs/development/nim-packages/jsonschema/default.nix
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
{ fetchFromGitHub }:
|
||||||
|
|
||||||
|
fetchFromGitHub {
|
||||||
|
owner = "PMunch";
|
||||||
|
repo = "jsonschema";
|
||||||
|
rev = "7b41c03e3e1a487d5a8f6b940ca8e764dc2cbabf";
|
||||||
|
sha256 = "1js64jqd854yjladxvnylij4rsz7212k31ks541pqrdzm6hpblbz";
|
||||||
|
}
|
|
@ -1,22 +1,9 @@
|
||||||
{ lib, stdenv, fetchFromGitHub, srcOnly, nim }:
|
{ lib, nimPackages, fetchFromGitHub, srcOnly, nim }:
|
||||||
let
|
|
||||||
astpatternmatching = fetchFromGitHub {
|
|
||||||
owner = "krux02";
|
|
||||||
repo = "ast-pattern-matching";
|
|
||||||
rev = "87f7d163421af5a4f5e5cb6da7b93278e6897e96";
|
|
||||||
sha256 = "19mb5bb6riia8380p5dpc3q0vwgrj958dd6p7vw8vkvwiqrzg6zq";
|
|
||||||
};
|
|
||||||
|
|
||||||
jsonschema = fetchFromGitHub {
|
nimPackages.buildNimPackage rec {
|
||||||
owner = "PMunch";
|
|
||||||
repo = "jsonschema";
|
|
||||||
rev = "7b41c03e3e1a487d5a8f6b940ca8e764dc2cbabf";
|
|
||||||
sha256 = "1js64jqd854yjladxvnylij4rsz7212k31ks541pqrdzm6hpblbz";
|
|
||||||
};
|
|
||||||
in
|
|
||||||
stdenv.mkDerivation rec {
|
|
||||||
pname = "nimlsp";
|
pname = "nimlsp";
|
||||||
version = "0.3.2";
|
version = "0.3.2";
|
||||||
|
nimBinOnly = true;
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "PMunch";
|
owner = "PMunch";
|
||||||
|
@ -25,18 +12,15 @@ stdenv.mkDerivation rec {
|
||||||
sha256 = "1lm823nvpp3bj9527jd8n1jxh6y8p8ngkfkj91p94m7ffai6jazq";
|
sha256 = "1lm823nvpp3bj9527jd8n1jxh6y8p8ngkfkj91p94m7ffai6jazq";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ nim ];
|
buildInputs = with nimPackages; [ astpatternmatching jsonschema ];
|
||||||
|
|
||||||
buildPhase = ''
|
nimFlags = [
|
||||||
export HOME=$TMPDIR
|
"--threads:on"
|
||||||
nim -d:release -p:${astpatternmatching}/src -p:${jsonschema}/src \
|
"-d:explicitSourcePath=${srcOnly nimPackages.nim.passthru.nim}"
|
||||||
c --threads:on -d:nimcore -d:nimsuggest -d:debugCommunication \
|
"-d:tempDir=/tmp"
|
||||||
-d:debugLogging -d:explicitSourcePath=${srcOnly nim.passthru.nim} -d:tempDir=/tmp src/nimlsp
|
];
|
||||||
'';
|
|
||||||
|
|
||||||
installPhase = ''
|
nimDefines = [ "nimcore" "nimsuggest" "debugCommunication" "debugLogging" ];
|
||||||
install -Dt $out/bin src/nimlsp
|
|
||||||
'';
|
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "Language Server Protocol implementation for Nim";
|
description = "Language Server Protocol implementation for Nim";
|
||||||
|
|
|
@ -9,6 +9,9 @@ lib.makeScope newScope (self:
|
||||||
callPackage ../development/nim-packages/build-nim-package { };
|
callPackage ../development/nim-packages/build-nim-package { };
|
||||||
fetchNimble = callPackage ../development/nim-packages/fetch-nimble { };
|
fetchNimble = callPackage ../development/nim-packages/fetch-nimble { };
|
||||||
|
|
||||||
|
astpatternmatching =
|
||||||
|
callPackage ../development/nim-packages/astpatternmatching { };
|
||||||
|
|
||||||
bumpy = callPackage ../development/nim-packages/bumpy { };
|
bumpy = callPackage ../development/nim-packages/bumpy { };
|
||||||
|
|
||||||
chroma = callPackage ../development/nim-packages/chroma { };
|
chroma = callPackage ../development/nim-packages/chroma { };
|
||||||
|
@ -19,6 +22,8 @@ lib.makeScope newScope (self:
|
||||||
|
|
||||||
jester = callPackage ../development/nim-packages/jester { };
|
jester = callPackage ../development/nim-packages/jester { };
|
||||||
|
|
||||||
|
jsonschema = callPackage ../development/nim-packages/jsonschema { };
|
||||||
|
|
||||||
karax = callPackage ../development/nim-packages/karax { };
|
karax = callPackage ../development/nim-packages/karax { };
|
||||||
|
|
||||||
markdown = callPackage ../development/nim-packages/markdown { };
|
markdown = callPackage ../development/nim-packages/markdown { };
|
||||||
|
|
Loading…
Reference in a new issue