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 mainProgram = "textx";
83 homepage = "https://github.com/textx/textx/";
84 license = licenses.mit;
85 maintainers = with maintainers; [ yuu ];
89 textx-data-dsl = buildPythonPackage rec {
90 pname = "textx-data-dsl";
93 # `format` isn't included in the output of `mk-python-derivation`.
94 # So can't inherit format: `error: attribute 'format' missing`.
95 format = "setuptools";
96 pathToSourceRoot = "tests/functional/registration/projects/data_dsl";
97 sourceRoot = "${src.name}/" + pathToSourceRoot;
98 propagatedBuildInputs = [
103 inherit (textx.meta) license maintainers;
104 description = "Sample textX language for testing";
105 homepage = textx.homepage + "tree/${version}/" + pathToSourceRoot;
109 textx-flow-codegen = buildPythonPackage rec {
110 pname = "textx-flow-codegen";
113 format = "setuptools";
114 pathToSourceRoot = "tests/functional/registration/projects/flow_codegen";
115 sourceRoot = "${src.name}/" + pathToSourceRoot;
116 propagatedBuildInputs = [
121 inherit (textx.meta) license maintainers;
122 description = "Sample textX language for testing";
123 homepage = textx.homepage + "tree/${version}/" + pathToSourceRoot;
127 textx-flow-dsl = buildPythonPackage rec {
128 pname = "textx-flow-dsl";
131 format = "setuptools";
132 pathToSourceRoot = "tests/functional/registration/projects/flow_dsl";
133 sourceRoot = "${src.name}/" + pathToSourceRoot;
134 propagatedBuildInputs = [
138 inherit (textx.meta) license maintainers;
139 description = "Sample textX language for testing";
140 homepage = textx.homepage + "tree/${version}/" + pathToSourceRoot;
144 textx-types-dsl = buildPythonPackage rec {
145 pname = "textx-types-dsl";
148 format = "setuptools";
149 pathToSourceRoot = "tests/functional/registration/projects/types_dsl";
150 sourceRoot = "${src.name}/" + pathToSourceRoot;
151 propagatedBuildInputs = [
155 inherit (textx.meta) license maintainers;
156 description = "Sample textX language for testing";
157 homepage = textx.homepage + "tree/${version}/" + pathToSourceRoot;
161 textx-example-project = buildPythonPackage rec {
162 pname = "textx-example-project";
165 format = "setuptools";
166 pathToSourceRoot = "tests/functional/subcommands/example_project";
167 sourceRoot = "${src.name}/" + pathToSourceRoot;
168 propagatedBuildInputs = [
172 inherit (textx.meta) license maintainers;
173 description = "Sample textX sub-command for testing";
174 homepage = textx.homepage + "tree/${version}/" + pathToSourceRoot;