2021-01-26 13:14:31 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, pytestCheckHook
|
|
|
|
, pytest-django
|
|
|
|
, django
|
|
|
|
}:
|
2019-01-27 14:26:30 +00:00
|
|
|
|
2021-01-26 13:14:31 +00:00
|
|
|
buildPythonPackage rec {
|
2019-01-27 14:26:30 +00:00
|
|
|
pname = "django-crispy-forms";
|
2021-01-26 13:14:31 +00:00
|
|
|
version = "1.10.0";
|
2019-01-27 14:26:30 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "django-crispy-forms";
|
|
|
|
repo = "django-crispy-forms";
|
2021-01-26 13:14:31 +00:00
|
|
|
rev = version;
|
|
|
|
sha256 = "0y6kskfxgckb9npcgwx4zrs5n9px159zh9zhinhxi3i7wlriqpf5";
|
2019-01-27 14:26:30 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
# For reasons unknown, the source dir must contain a dash
|
|
|
|
# for the tests to run successfully
|
|
|
|
postUnpack = ''
|
|
|
|
mv $sourceRoot source-
|
|
|
|
export sourceRoot=source-
|
|
|
|
'';
|
|
|
|
|
2021-01-26 13:14:31 +00:00
|
|
|
checkInputs = [ django pytest-django pytestCheckHook ];
|
2019-01-27 14:26:30 +00:00
|
|
|
|
2021-01-26 13:14:31 +00:00
|
|
|
preCheck = ''
|
|
|
|
export DJANGO_SETTINGS_MODULE=crispy_forms.tests.test_settings
|
2019-01-27 14:26:30 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "The best way to have DRY Django forms";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://github.com/maraujop/django-crispy-forms";
|
2019-01-27 14:26:30 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ earvstedt ];
|
|
|
|
};
|
|
|
|
}
|