From ec6088424bf9f71bbbdcba996c2a2394ce98362f Mon Sep 17 00:00:00 2001 From: Harinn Date: Thu, 13 Aug 2026 22:59:13 +0700 Subject: [PATCH] python3Packages.django-ranged-response: modernize --- .../django-ranged-response/default.nix | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/pkgs/development/python-modules/django-ranged-response/default.nix b/pkgs/development/python-modules/django-ranged-response/default.nix index 51a98a1212dd..418c49c533a3 100644 --- a/pkgs/development/python-modules/django-ranged-response/default.nix +++ b/pkgs/development/python-modules/django-ranged-response/default.nix @@ -6,14 +6,16 @@ django, }: -buildPythonPackage rec { +buildPythonPackage (finalAttrs: { pname = "django-ranged-response"; version = "0.2.0"; pyproject = true; + __structuredAttrs = true; + src = fetchPypi { - inherit pname version; - sha256 = "11gr3jpmb5rvg3scv026kjwwkmnxwivgq5ypxadnnc9p58szy7zp"; + inherit (finalAttrs) pname version; + hash = "sha256-9x//NSo3MWub6tcX/Hbk3dbJuZxGgM30eDuXVa8c+YU="; }; build-system = [ setuptools ]; @@ -23,10 +25,12 @@ buildPythonPackage rec { dependencies = [ django ]; + pythonImportsCheck = [ "ranged_response" ]; + meta = { description = "Modified FileResponse that returns `Content-Range` headers with the HTTP response, so browsers (read Safari 9+) that request the file, can stream the response properly"; homepage = "https://github.com/wearespindle/django-ranged-fileresponse"; license = lib.licenses.mit; maintainers = with lib.maintainers; [ mrmebelman ]; }; -} +})