diff options
author | Mario Rodas <marsam@users.noreply.github.com> | 2021-01-06 04:20:00 +0000 |
---|---|---|
committer | Emery Hemingway <ehmry@posteo.net> | 2021-01-08 11:04:25 +0100 |
commit | 0946f962f4f5c1d409a7822487bb9761a10d3517 (patch) | |
tree | 0a4ba7438295f8c1f5184e88b055603c92fe9fcb /pkgs/development/tools/misc/nimlsp/default.nix | |
parent | 2b1f8235b4086e3cf73c2bb03a60371f29a9fcaf (diff) |
nimlsp: init at 0.2.6
Co-authored-by: nbonfils <nbonfils@users.noreply.github.com>
Diffstat (limited to 'pkgs/development/tools/misc/nimlsp/default.nix')
-rw-r--r-- | pkgs/development/tools/misc/nimlsp/default.nix | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/pkgs/development/tools/misc/nimlsp/default.nix b/pkgs/development/tools/misc/nimlsp/default.nix new file mode 100644 index 0000000000000..5795fca457d18 --- /dev/null +++ b/pkgs/development/tools/misc/nimlsp/default.nix @@ -0,0 +1,48 @@ +{ stdenv, fetchFromGitHub, srcOnly, nim }: +let + astpatternmatching = fetchFromGitHub { + owner = "krux02"; + repo = "ast-pattern-matching"; + rev = "87f7d163421af5a4f5e5cb6da7b93278e6897e96"; + sha256 = "19mb5bb6riia8380p5dpc3q0vwgrj958dd6p7vw8vkvwiqrzg6zq"; + }; + + jsonschema = fetchFromGitHub { + owner = "PMunch"; + repo = "jsonschema"; + rev = "7b41c03e3e1a487d5a8f6b940ca8e764dc2cbabf"; + sha256 = "1js64jqd854yjladxvnylij4rsz7212k31ks541pqrdzm6hpblbz"; + }; +in +stdenv.mkDerivation rec { + pname = "nimlsp"; + version = "0.2.6"; + + src = fetchFromGitHub { + owner = "PMunch"; + repo = "nimlsp"; + rev = "v${version}"; + sha256 = "13kw3zjh0iqymwqxwhyj8jz6hgswwahf1rjd6iad7c6gcwrrg6yl"; + }; + + nativeBuildInputs = [ nim ]; + + buildPhase = '' + export HOME=$TMPDIR + nim -d:release -p:${astpatternmatching}/src -p:${jsonschema}/src \ + c --threads:on -d:nimcore -d:nimsuggest -d:debugCommunication \ + -d:debugLogging -d:explicitSourcePath=${srcOnly nim.unwrapped} -d:tempDir=/tmp src/nimlsp + ''; + + installPhase = '' + install -Dt $out/bin src/nimlsp + ''; + + meta = with stdenv.lib; { + description = "Language Server Protocol implementation for Nim"; + homepage = "https://github.com/PMunch/nimlsp"; + license = licenses.mit; + platforms = nim.meta.platforms; + maintainers = [ maintainers.marsam ]; + }; +} |