diff --git a/pkgs/development/python-modules/whitenoise/default.nix b/pkgs/development/python-modules/whitenoise/default.nix index 2e8b496ce514..eb7145814487 100644 --- a/pkgs/development/python-modules/whitenoise/default.nix +++ b/pkgs/development/python-modules/whitenoise/default.nix @@ -9,7 +9,7 @@ setuptools, }: -buildPythonPackage rec { +buildPythonPackage (finalAttrs: { pname = "whitenoise"; version = "6.12.0"; pyproject = true; @@ -17,7 +17,7 @@ buildPythonPackage rec { src = fetchFromGitHub { owner = "evansd"; repo = "whitenoise"; - tag = version; + tag = finalAttrs.version; hash = "sha256-qNya/3oI9413VUGaLPq4vtuLvq9mIGhaYBt+4OhrkOw="; }; @@ -25,13 +25,14 @@ buildPythonPackage rec { build-system = [ setuptools ]; - dependencies = [ brotli ]; + optional-dependencies.brotli = [ brotli ]; nativeCheckInputs = [ django pytestCheckHook requests - ]; + ] + ++ finalAttrs.passthru.optional-dependencies.brotli; disabledTests = [ # Test fails with AssertionError @@ -43,8 +44,8 @@ buildPythonPackage rec { meta = { description = "Library to serve static file for WSGI applications"; homepage = "https://whitenoise.readthedocs.io/"; - changelog = "https://github.com/evansd/whitenoise/blob/${version}/docs/changelog.rst"; + changelog = "https://github.com/evansd/whitenoise/blob/${finalAttrs.src.tag}/docs/changelog.rst"; license = lib.licenses.mit; maintainers = [ ]; }; -} +})