1{ buildPythonApplication
2, lib
3, fetchFromGitHub
4, setuptools-scm
5, json5
6, packaging
7}:
8
9buildPythonApplication rec {
10 pname = "fortls";
11 version = "2.13.0";
12
13 src = fetchFromGitHub {
14 owner = "fortran-lang";
15 repo = pname;
16 rev = "v${version}";
17 hash = "sha256-kFk2Dlnb0FXM3Ysvsy+g2AAMgpWmwzxuyJPovDm/FJU=";
18 };
19
20 nativeBuildInputs = [ setuptools-scm ];
21
22 propagatedBuildInputs = [ json5 packaging ];
23
24 preBuild = "export SETUPTOOLS_SCM_PRETEND_VERSION=${version}";
25
26 doCheck = true;
27 checkPhase = "$out/bin/fortls --help 1>/dev/null";
28
29 meta = with lib; {
30 description = "Fortran Language Server ";
31 homepage = "https://github.com/fortran-lang/fortls";
32 license = [ licenses.mit ];
33 maintainers = [ maintainers.sheepforce ];
34 };
35}