Commit 6240432c authored by Emery Hemingway's avatar Emery Hemingway
Browse files

nimlsp: build with lockfile

parent 862b9061
Loading
Loading
Loading
Loading
+40 −0
Original line number Diff line number Diff line
{
  "depends": [
    {
      "method": "fetchzip",
      "packages": [
        "ast_pattern_matching"
      ],
      "path": "/nix/store/b4rlaqmh5cm1yk62w8ij05swgdc9n5xq-source",
      "ref": "master",
      "rev": "eb8b99d595517fd5d41ccc954edb896267f2db78",
      "sha256": "13l1qracvcyykjkmgl6zla960yayj1ka6y983wxp6z8fpwb25wn0",
      "srcDir": "src",
      "url": "https://github.com/nim-lang/ast-pattern-matching/archive/eb8b99d595517fd5d41ccc954edb896267f2db78.tar.gz"
    },
    {
      "method": "fetchzip",
      "packages": [
        "asynctools"
      ],
      "path": "/nix/store/7hkns6lb477pnpyzkj2cq8q10shbshwn-source",
      "ref": "master",
      "rev": "a1a17d06713727d97810cad291e29dd7c672738f",
      "sha256": "160h0k26f7xd5fbblc2l29d19ndgixb3aand3j5adrdbkkqhlgz0",
      "srcDir": "",
      "url": "https://github.com/cheatfate/asynctools/archive/a1a17d06713727d97810cad291e29dd7c672738f.tar.gz"
    },
    {
      "method": "fetchzip",
      "packages": [
        "jsonschema"
      ],
      "path": "/nix/store/f9yjcyrvkz9rk1871377hkzlv9rq1x3b-source",
      "ref": "packedjson",
      "rev": "40208614ea3758e05ea39ab090de258046f99cb3",
      "sha256": "12rli1qsx3hsldbs08qphcajh3nbv7hbclsygjacmxxc8im1y5m0",
      "srcDir": "src",
      "url": "https://github.com/PMunch/jsonschema/archive/40208614ea3758e05ea39ab090de258046f99cb3.tar.gz"
    }
  ]
}
+46 −0
Original line number Diff line number Diff line
{ lib, nimPackages, fetchFromGitHub, srcOnly, nim }:
{ lib, buildNimPackage, fetchFromGitHub, srcOnly, nim-unwrapped-1 }:

nimPackages.buildNimPackage rec {
buildNimPackage (finalAttrs: {
  pname = "nimlsp";
  version = "0.4.4";
  nimBinOnly = true;

  requiredNimVersion = 1;

  src = fetchFromGitHub {
    owner = "PMunch";
    repo = "nimlsp";
    rev = "v${version}";
    rev = "v${finalAttrs.version}";
    sha256 = "sha256-Z67iKlL+dnRbxdFt/n/fsUcb2wpZwzPpL/G29jfCaMY=";
  };

  buildInputs = with nimPackages; [ jsonschema asynctools ];
  lockFile = ./lock.json;

  buildInputs =
    let
      # Needs this specific version to build.
      jsonSchemaSrc = fetchFromGitHub {
        owner = "PMunch";
        repo = "jsonschema";
        rev = "7b41c03e3e1a487d5a8f6b940ca8e764dc2cbabf";
        sha256 = "1js64jqd854yjladxvnylij4rsz7212k31ks541pqrdzm6hpblbz";
      };
    in
    [ jsonSchemaSrc ];

  nimFlags = [
    "--threads:on"
    "-d:explicitSourcePath=${srcOnly nimPackages.nim.passthru.nim}"
    "-d:explicitSourcePath=${srcOnly nim-unwrapped-1}"
    "-d:tempDir=/tmp"
  ];

@@ -24,11 +37,10 @@ nimPackages.buildNimPackage rec {

  doCheck = false;

  meta = with lib; {
  meta = {
    description = "Language Server Protocol implementation for Nim";
    homepage = "https://github.com/PMunch/nimlsp";
    license = licenses.mit;
    platforms = nim.meta.platforms;
    maintainers = [ maintainers.marsam ];
    license = lib.licenses.mit;
    maintainers = [ lib.maintainers.marsam ];
  };
}
})
+0 −2
Original line number Diff line number Diff line
@@ -16799,8 +16799,6 @@ with pkgs;
  buildNimPackage = callPackage ../development/compilers/nim/build-nim-package.nix { };
  nimOverrides = callPackage ./nim-overrides.nix { };
  nimlsp = callPackage ../development/tools/misc/nimlsp { };
  neko = callPackage ../development/compilers/neko { };
  nextpnr = callPackage ../development/compilers/nextpnr { };