Commit 9745c36f authored by Robert Schütz's avatar Robert Schütz
Browse files

python3Packages.djangorestframework-dataclasses: modernize

parent d6090ef7
Loading
Loading
Loading
Loading
+11 −6
Original line number Diff line number Diff line
@@ -9,7 +9,7 @@
buildPythonPackage rec {
  pname = "djangorestframework-dataclasses";
  version = "1.4.0";
  format = "pyproject";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "oxan";
@@ -18,24 +18,29 @@ buildPythonPackage rec {
    hash = "sha256-nUkR5xTyeBv7ziJ6Mej9TKvMOa5/k+ELBqt4BVam/wk=";
  };

  nativeBuildInputs = [ setuptools ];
  build-system = [ setuptools ];

  postPatch = ''
    patchShebangs manage.py
  '';

  propagatedBuildInputs = [ djangorestframework ];
  dependencies = [ djangorestframework ];

  checkPhase = ''
    runHook preCheck

    ./manage.py test

    runHook postCheck
  '';

  pythonImportsCheck = [ "rest_framework_dataclasses" ];

  meta = with lib; {
  meta = {
    changelog = "https://github.com/oxan/djangorestframework-dataclasses/blob/${src.tag}/CHANGELOG.rst";
    description = "Dataclasses serializer for Django REST framework";
    homepage = "https://github.com/oxan/djangorestframework-dataclasses";
    license = licenses.bsd3;
    license = lib.licenses.bsd3;
    maintainers = [ ];
  };
}