nixpkgs/pkgs/development/python-modules/static3/default.nix
Alexis Hildebrandt 755b915a15 treewide: Remove indefinite article from meta.description
nix run nixpkgs#silver-searcher -- -G '\.nix$' -0l 'description.*"[Aa]n?' pkgs \
  | xargs -0 nix run nixpkgs#gnused -- -i '' -Ee 's/(description.*")[Aa]n? (.)/\1\U\2/'
2024-06-09 23:07:45 +02:00

54 lines
1.1 KiB
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
# optionals
genshi,
# tests
pytestCheckHook,
webtest,
}:
buildPythonPackage rec {
pname = "static3";
version = "0.7.0";
format = "setuptools";
src = fetchFromGitHub {
owner = "rmohr";
repo = "static3";
rev = "v${version}";
hash = "sha256-uFgv+57/UZs4KoOdkFxbvTEDQrJbb0iYJ5JoWWN4yFY=";
};
postPatch = ''
substituteInPlace setup.py \
--replace ", 'pytest-cov'" ""
'';
passthru.optional-dependencies = {
KidMagic = [
# TODO: kid
];
Genshimagic = [ genshi ];
};
pythonImportsCheck = [ "static" ];
nativeCheckInputs = [
pytestCheckHook
webtest
] ++ lib.flatten (builtins.attrValues passthru.optional-dependencies);
meta = with lib; {
changelog = "https://github.com/rmohr/static3/releases/tag/v${version}";
description = "Really simple WSGI way to serve static (or mixed) content";
mainProgram = "static";
homepage = "https://github.com/rmohr/static3";
license = licenses.lgpl21Only;
maintainers = with maintainers; [ hexa ];
};
}