depot/third_party/nixpkgs/pkgs/development/python-modules/django-pattern-library/default.nix
Default email ed0c4a69f0 Project import generated by Copybara.
GitOrigin-RevId: e3652e0735fbec227f342712f180f4f21f0594f2
2023-03-31 00:05:00 +02:00

55 lines
1.1 KiB
Nix

{ beautifulsoup4
, buildPythonPackage
, django
, fetchFromGitHub
, lib
, markdown
, poetry-core
, python
, pyyaml
}:
buildPythonPackage rec {
pname = "django-pattern-library";
version = "1.0.0";
format = "pyproject";
src = fetchFromGitHub {
repo = pname;
owner = "torchbox";
rev = "v${version}";
sha256 = "sha256-V299HpbfNLa9cpVhBfzD41oe95xqh+ktQVMMVvm5Xao=";
};
propagatedBuildInputs = [
django
pyyaml
markdown
];
postPatch = ''
substituteInPlace pyproject.toml \
--replace poetry.masonry.api poetry.core.masonry.api
'';
nativeBuildInputs = [ poetry-core ];
checkInputs = [
beautifulsoup4
];
checkPhase = ''
export DJANGO_SETTINGS_MODULE=tests.settings.dev
${python.interpreter} -m django test
'';
pythonImportsCheck = [ "pattern_library" ];
meta = with lib; {
description = "UI pattern libraries for Django templates";
homepage = "https://github.com/torchbox/django-pattern-library/";
changelog = "https://github.com/torchbox/django-pattern-library/blob/v${version}/CHANGELOG.md";
license = licenses.bsd3;
maintainers = with maintainers; [ sephi ];
};
}