diff --git a/pkgs/development/python-modules/calmjs-types/default.nix b/pkgs/development/python-modules/calmjs-types/default.nix new file mode 100644 index 000000000000..9f940e92c502 --- /dev/null +++ b/pkgs/development/python-modules/calmjs-types/default.nix @@ -0,0 +1,28 @@ +{ lib +, fetchPypi +, buildPythonPackage +, pytestCheckHook +}: + +buildPythonPackage rec { + pname = "calmjs-types"; + version = "1.0.1"; + + src = fetchPypi { + pname = "calmjs.types"; + inherit version; + sha256 = "sha256-EGWYv9mx3RPqs9dnB5t3Bu3hiujL2y/XxyMP7JkjjAQ="; + extension = "zip"; + }; + + checkInputs = [ pytestCheckHook ]; + + pythonImportsCheck = [ "calmjs.types" ]; + + meta = with lib; { + description = "Types for the calmjs framework"; + homepage = "https://github.com/calmjs/calmjs.types"; + license = licenses.mit; + maintainers = with maintainers; [ onny ]; + }; +} diff --git a/pkgs/development/python-modules/calmjs/default.nix b/pkgs/development/python-modules/calmjs/default.nix new file mode 100644 index 000000000000..2f27dbc98523 --- /dev/null +++ b/pkgs/development/python-modules/calmjs/default.nix @@ -0,0 +1,54 @@ +{ lib +, fetchPypi +, buildPythonPackage +, calmjs-types +, calmjs-parse +, pytestCheckHook +}: + +buildPythonPackage rec { + pname = "calmjs"; + version = "3.4.4"; + + src = fetchPypi { + inherit pname version; + sha256 = "sha256-73NQiY1RMdBrMIlm/VTvHY4dCHL1pQoj6a48CWRos3o="; + extension = "zip"; + }; + + propagatedBuildInputs = [ + calmjs-parse + calmjs-types + ]; + + checkInputs = [ + pytestCheckHook + ]; + + # ModuleNotFoundError: No module named 'calmjs.types' + # Not yet clear how to run these tests correctly + # https://github.com/calmjs/calmjs/issues/63 + # https://github.com/NixOS/nixpkgs/pull/186298 + disabledTestPaths = [ + "src/calmjs/tests/test_dist.py" + "src/calmjs/tests/test_testing.py" + "src/calmjs/tests/test_artifact.py" + "src/calmjs/tests/test_interrogate.py" + "src/calmjs/tests/test_loaderplugin.py" + "src/calmjs/tests/test_npm.py" + "src/calmjs/tests/test_runtime.py" + "src/calmjs/tests/test_toolchain.py" + "src/calmjs/tests/test_vlqsm.py" + "src/calmjs/tests/test_yarn.py" + "src/calmjs/tests/test_command.py" + ]; + + pythonImportsCheck = [ "calmjs" ]; + + meta = with lib; { + description = "Framework for building toolchains and utilities for working with the Node.js ecosystem"; + homepage = "https://github.com/calmjs/calmjs"; + license = licenses.gpl2; + maintainers = with maintainers; [ onny ]; + }; +} diff --git a/pkgs/development/python-modules/django-compressor/default.nix b/pkgs/development/python-modules/django-compressor/default.nix index 788eab0ae326..a8d367e854af 100644 --- a/pkgs/development/python-modules/django-compressor/default.nix +++ b/pkgs/development/python-modules/django-compressor/default.nix @@ -7,6 +7,12 @@ , beautifulsoup4 , brotli , pytestCheckHook +, django-sekizai +, pytest-django +, csscompressor +, calmjs +, jinja2 +, python }: buildPythonPackage rec { @@ -21,23 +27,32 @@ buildPythonPackage rec { }; propagatedBuildInputs = [ + beautifulsoup4 + calmjs + django-appconf + jinja2 rcssmin rjsmin - django-appconf ]; - pythonImportsCheck = [ - "compressor" - ]; - - doCheck = false; # missing package django-sekizai - - nativeCheckInputs = [ + checkInputs = [ beautifulsoup4 brotli + csscompressor + django-sekizai pytestCheckHook + pytest-django ]; + # Getting error: compressor.exceptions.OfflineGenerationError: You have + # offline compression enabled but key "..." is missing from offline manifest. + # You may need to run "python manage.py compress" + disabledTestPaths = [ + "compressor/tests/test_offline.py" + ]; + + pythonImportsCheck = [ "compressor" ]; + DJANGO_SETTINGS_MODULE = "compressor.test_settings"; meta = with lib; { diff --git a/pkgs/development/python-modules/django-sekizai/default.nix b/pkgs/development/python-modules/django-sekizai/default.nix new file mode 100644 index 000000000000..3c4e351f25b4 --- /dev/null +++ b/pkgs/development/python-modules/django-sekizai/default.nix @@ -0,0 +1,37 @@ +{ lib +, fetchPypi +, buildPythonPackage +, django_classytags +, pytestCheckHook +, pytest-django +}: + +buildPythonPackage rec { + pname = "django-sekizai"; + version = "4.1.0"; + + src = fetchPypi { + inherit pname version; + sha256 = "sha256-Kso2y64LXAzv7ZVlQW7EQjNXZ/sxRb/xHlhiL8ZTza0="; + }; + + propagatedBuildInputs = [ + django_classytags + ]; + + checkInputs = [ + pytestCheckHook + pytest-django + ]; + + pythonImportsCheck = [ "sekizai" ]; + + DJANGO_SETTINGS_MODULE = "tests.settings"; + + meta = with lib; { + description = "Define placeholders where your blocks get rendered and append to those blocks"; + homepage = "https://github.com/django-cms/django-sekizai"; + license = licenses.bsd3; + maintainers = with maintainers; [ onny ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 143ef142c98c..2d2f07fe9bdb 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -1637,8 +1637,12 @@ self: super: with self; { callee = callPackage ../development/python-modules/callee { }; + calmjs = callPackage ../development/python-modules/calmjs { }; + calmjs-parse = callPackage ../development/python-modules/calmjs-parse { }; + calmjs-types = callPackage ../development/python-modules/calmjs-types { }; + calysto = callPackage ../development/python-modules/calysto { }; calysto-scheme = callPackage ../development/python-modules/calysto-scheme { }; @@ -2875,6 +2879,8 @@ self: super: with self; { django-reversion = callPackage ../development/python-modules/django-reversion { }; + django-sekizai = callPackage ../development/python-modules/django-sekizai { }; + django-sesame = callPackage ../development/python-modules/django-sesame { }; django_silk = callPackage ../development/python-modules/django_silk { };