diff options
author | Emery Hemingway <ehmry@posteo.net> | 2021-09-02 18:24:10 +0200 |
---|---|---|
committer | Emery Hemingway <ehmry@posteo.net> | 2021-09-05 11:20:01 +0200 |
commit | 766671c7fd7aed868fbcc3d836e486735da892bb (patch) | |
tree | a2eb62ad8b08d4108fd78767dc119fb1f0bf528b /pkgs/development/tools/misc/nimlsp/default.nix | |
parent | 724bde1acfc5480b529bf53b5504b2a07ce5436b (diff) |
nimlsp: convert to buildNimPackage
Diffstat (limited to 'pkgs/development/tools/misc/nimlsp/default.nix')
-rw-r--r-- | pkgs/development/tools/misc/nimlsp/default.nix | 36 |
1 files changed, 10 insertions, 26 deletions
diff --git a/pkgs/development/tools/misc/nimlsp/default.nix b/pkgs/development/tools/misc/nimlsp/default.nix index b1d59c9450acc..0e837b8fd614d 100644 --- a/pkgs/development/tools/misc/nimlsp/default.nix +++ b/pkgs/development/tools/misc/nimlsp/default.nix @@ -1,22 +1,9 @@ -{ lib, stdenv, fetchFromGitHub, srcOnly, nim }: -let - astpatternmatching = fetchFromGitHub { - owner = "krux02"; - repo = "ast-pattern-matching"; - rev = "87f7d163421af5a4f5e5cb6da7b93278e6897e96"; - sha256 = "19mb5bb6riia8380p5dpc3q0vwgrj958dd6p7vw8vkvwiqrzg6zq"; - }; +{ lib, nimPackages, fetchFromGitHub, srcOnly, nim }: - jsonschema = fetchFromGitHub { - owner = "PMunch"; - repo = "jsonschema"; - rev = "7b41c03e3e1a487d5a8f6b940ca8e764dc2cbabf"; - sha256 = "1js64jqd854yjladxvnylij4rsz7212k31ks541pqrdzm6hpblbz"; - }; -in -stdenv.mkDerivation rec { +nimPackages.buildNimPackage rec { pname = "nimlsp"; version = "0.3.2"; + nimBinOnly = true; src = fetchFromGitHub { owner = "PMunch"; @@ -25,18 +12,15 @@ stdenv.mkDerivation rec { sha256 = "1lm823nvpp3bj9527jd8n1jxh6y8p8ngkfkj91p94m7ffai6jazq"; }; - nativeBuildInputs = [ nim ]; + buildInputs = with nimPackages; [ astpatternmatching jsonschema ]; - 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.passthru.nim} -d:tempDir=/tmp src/nimlsp - ''; + nimFlags = [ + "--threads:on" + "-d:explicitSourcePath=${srcOnly nimPackages.nim.passthru.nim}" + "-d:tempDir=/tmp" + ]; - installPhase = '' - install -Dt $out/bin src/nimlsp - ''; + nimDefines = [ "nimcore" "nimsuggest" "debugCommunication" "debugLogging" ]; meta = with lib; { description = "Language Server Protocol implementation for Nim"; |