8 python = python3.override {
9 packageOverrides = self: super: {
10 lark = super.lark.overridePythonAttrs (old: rec {
11 # gdtoolkit needs exactly this lark version
13 src = fetchFromGitHub {
14 owner = "lark-parser";
17 hash = "sha256-KN9buVlH8hJ8t0ZP5yefeYM5vH5Gg7a7TEDGKJYpozs=";
18 fetchSubmodules = true;
25 python.pkgs.buildPythonApplication rec {
29 # If we try to get using fetchPypi it requires GeoIP (but the package dont has that dep!?)
30 src = fetchFromGitHub {
32 repo = "godot-gdscript-toolkit";
34 sha256 = "13nnpwy550jf5qnm9ixpxl1bwfnhhbiys8vqfd25g3aim4bm3gnn";
37 disabled = python.pythonOlder "3.7";
39 propagatedBuildInputs = with python.pkgs; [
48 nativeCheckInputs = with python.pkgs; [
56 godotServerMajorVersion = lib.versions.major godot3-server.version;
57 gdtoolkitMajorVersion = lib.versions.major version;
59 gdtoolkit major version ${gdtoolkitMajorVersion} does not match godot-server major version ${godotServerMajorVersion}!
60 gdtoolkit needs a matching godot-server for its tests.
61 If you see this error, you can either:
62 - disable doCheck for gdtoolkit, or
63 - provide a compatible godot-server version to gdtoolkit"
65 in lib.throwIf (godotServerMajorVersion != gdtoolkitMajorVersion) msg ''
66 # The tests want to run the installed executables
67 export PATH=$out/bin:$PATH
69 # gdtoolkit tries to write cache variables to $HOME/.cache
72 # Work around https://github.com/godotengine/godot/issues/20503
73 # Without this, Godot will complain about a missing project file
76 # Remove broken test case
77 # (hard to skip via disabledTests since the test name contains an absolute path)
78 rm tests/potential-godot-bugs/multiline-subscription-expression.gd
81 pythonImportsCheck = [ "gdtoolkit" "gdtoolkit.formatter" "gdtoolkit.linter" "gdtoolkit.parser" ];
84 description = "Independent set of tools for working with Godot's GDScript - parser, linter and formatter";
85 homepage = "https://github.com/Scony/godot-gdscript-toolkit";
86 license = licenses.mit;
87 maintainers = with maintainers; [ shiryel tmarkus ];