20 textx = buildPythonPackage rec {
23 format = "setuptools";
25 src = fetchFromGitHub {
29 hash = "sha256-uZlO82dKtWQQR5+Q7dWk3+ZoUzAjDJ8qzC4UMLCtnBk=";
33 substituteInPlace setup.cfg --replace "click >=7.0, <8.0" "click >=7.0"
46 propagatedBuildInputs = [
54 # FileNotFoundError: [Errno 2] No such file or directory: '$out/lib/python3.10/site-packages/textx/textx.tx
55 cp "$src/textx/textx.tx" "$out/${python.sitePackages}/${pname}/"
57 # Install tests as the tests output.
59 cp -r tests $testout/tests
62 pythonImportsCheck = [
66 # Circular dependencies, do tests in passthru.tests instead.
70 textxTests = callPackage ./tests.nix {
81 description = "Domain-specific languages and parsers in Python";
82 homepage = "https://github.com/textx/textx/";
83 license = licenses.mit;
84 maintainers = with maintainers; [ yuu ];
88 textx-data-dsl = buildPythonPackage rec {
89 pname = "textx-data-dsl";
92 # `format` isn't included in the output of `mk-python-derivation`.
93 # So can't inherit format: `error: attribute 'format' missing`.
94 format = "setuptools";
95 pathToSourceRoot = "tests/functional/registration/projects/data_dsl";
96 sourceRoot = "${src.name}/" + pathToSourceRoot;
97 propagatedBuildInputs = [
102 inherit (textx.meta) license maintainers;
103 description = "Sample textX language for testing";
104 homepage = textx.homepage + "tree/${version}/" + pathToSourceRoot;
108 textx-flow-codegen = buildPythonPackage rec {
109 pname = "textx-flow-codegen";
112 format = "setuptools";
113 pathToSourceRoot = "tests/functional/registration/projects/flow_codegen";
114 sourceRoot = "${src.name}/" + pathToSourceRoot;
115 propagatedBuildInputs = [
120 inherit (textx.meta) license maintainers;
121 description = "Sample textX language for testing";
122 homepage = textx.homepage + "tree/${version}/" + pathToSourceRoot;
126 textx-flow-dsl = buildPythonPackage rec {
127 pname = "textx-flow-dsl";
130 format = "setuptools";
131 pathToSourceRoot = "tests/functional/registration/projects/flow_dsl";
132 sourceRoot = "${src.name}/" + pathToSourceRoot;
133 propagatedBuildInputs = [
137 inherit (textx.meta) license maintainers;
138 description = "Sample textX language for testing";
139 homepage = textx.homepage + "tree/${version}/" + pathToSourceRoot;
143 textx-types-dsl = buildPythonPackage rec {
144 pname = "textx-types-dsl";
147 format = "setuptools";
148 pathToSourceRoot = "tests/functional/registration/projects/types_dsl";
149 sourceRoot = "${src.name}/" + pathToSourceRoot;
150 propagatedBuildInputs = [
154 inherit (textx.meta) license maintainers;
155 description = "Sample textX language for testing";
156 homepage = textx.homepage + "tree/${version}/" + pathToSourceRoot;
160 textx-example-project = buildPythonPackage rec {
161 pname = "textx-example-project";
164 format = "setuptools";
165 pathToSourceRoot = "tests/functional/subcommands/example_project";
166 sourceRoot = "${src.name}/" + pathToSourceRoot;
167 propagatedBuildInputs = [
171 inherit (textx.meta) license maintainers;
172 description = "Sample textX sub-command for testing";
173 homepage = textx.homepage + "tree/${version}/" + pathToSourceRoot;