adisbladis 02dab4ab5c python3.pkgs.*: Explicitly pass buildPythonPackage format parameter
Long term we should move everything over to `pyproject = true`, but in
the mean time we can work towards deprecating the implicit `format` paremeter.

cc https://github.com/NixOS/nixpkgs/issues/253154
cc @mweinelt @figsoda
2023-12-07 17:46:49 +01:00

43 lines
908 B
Nix

{ lib
, buildPythonPackage
, fetchFromGitHub
, django-guardian
, djangorestframework
}:
buildPythonPackage rec {
pname = "djangorestframework-guardian2";
version = "0.5.0";
format = "setuptools";
src = fetchFromGitHub {
owner = "johnthagen";
repo = "django-rest-framework-guardian2";
rev = "v${version}";
hash = "sha256-aW20xEmVTAgwayWMJsabmyKNW65NftJyQANtT6JV74U=";
};
postPatch = ''
chmod +x manage.py
patchShebangs manage.py
'';
propagatedBuildInputs = [
django-guardian
djangorestframework
];
checkPhase = ''
./manage.py test
'';
pythonImportsCheck = [ "rest_framework_guardian" ];
meta = with lib; {
description = "Django-guardian support for Django REST Framework";
homepage = "https://github.com/johnthagen/django-rest-framework-guardian2/";
license = licenses.bsd3;
maintainers = with maintainers; [ e1mo ];
};
}