2021-01-11 07:54:33 +00:00
|
|
|
{ lib, stdenv
|
2019-01-27 11:04:31 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, django
|
|
|
|
, djangorestframework, python, mock
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "django-filter";
|
2020-10-16 17:08:18 +00:00
|
|
|
version = "2.4.0";
|
2019-01-27 11:04:31 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2020-10-16 17:08:18 +00:00
|
|
|
sha256 = "84e9d5bb93f237e451db814ed422a3a625751cbc9968b484ecc74964a8696b06";
|
2019-01-27 11:04:31 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [ django ];
|
|
|
|
|
|
|
|
# Tests fail (needs the 'crispy_forms' module not packaged on nixos)
|
|
|
|
doCheck = false;
|
|
|
|
checkInputs = [ djangorestframework django mock ];
|
|
|
|
checkPhase = ''
|
|
|
|
runHook preCheck
|
|
|
|
${python.interpreter} runtests.py tests
|
|
|
|
runHook postCheck
|
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2019-01-27 11:04:31 +00:00
|
|
|
description = "Reusable Django application for allowing users to filter querysets dynamically";
|
|
|
|
homepage = "https://pypi.org/project/django-filter/";
|
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = with maintainers; [ mmai ];
|
|
|
|
};
|
|
|
|
}
|