a19cd4ffb1
This reverts commit65a333600d. This wasn't tested for correctness with something like fodwatch [0], and should not have been (self-)merged so quickly, especially without further review. It also resulted in the breakage of at least one package [1] (and that's the one we know of and was caught). A few packages that were updated in between this commit and this revert were not reverted back to using `rev`, but other than that, this is a 1:1 revert. [0]: https://codeberg.org/raphaelr/fodwatch [1]: https://github.com/NixOS/nixpkgs/pull/396904 /758551e458
47 lines
1.0 KiB
Nix
47 lines
1.0 KiB
Nix
{
|
|
lib,
|
|
buildPythonPackage,
|
|
fetchFromGitHub,
|
|
django,
|
|
django-guardian,
|
|
djangorestframework,
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "djangorestframework-guardian";
|
|
version = "0.3.0";
|
|
format = "setuptools";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "rpkilby";
|
|
repo = "django-rest-framework-guardian";
|
|
rev = version;
|
|
hash = "sha256-jl/VEl1pUHU8J1d5ZQSGJweNJayIGw1iVAmwID85fqw=";
|
|
};
|
|
|
|
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/rpkilby/django-rest-framework-guardian";
|
|
license = licenses.bsd3;
|
|
maintainers = [ ];
|
|
# unmaintained, last compatible version is 3.x, use djangorestframework-guardian2 instead
|
|
broken = lib.versionAtLeast django.version "4";
|
|
};
|
|
}
|