Files
nixpkgs/pkgs/development/python-modules/django-parler/default.nix
T
Robert Schütz 1a04744f74 treewide: remove superfluous disabled
There is no need to disable Python packages for Python versions that are
no longer in Nixpkgs.
This change was generated using the following script:

    pattern='^\s*disabled\s*=\s*pythonOlder\s*"3\.\([0-9]\|10\)"\s*;\s*$'
    for f in $(find -name '*.nix'); do
        grep -q "$pattern" "$f" || continue
        sed -i "/$pattern/d" "$f"
        if [ $(grep -c pythonOlder "$f") == 1 ]; then
            sed -i '/^\s*pythonOlder,\s*$/d' "$f"
        fi
        nixfmt "$f"
    done
2026-01-11 09:34:20 -08:00

47 lines
1.2 KiB
Nix

{
lib,
buildPythonPackage,
django,
fetchFromGitHub,
python,
setuptools,
}:
buildPythonPackage rec {
pname = "django-parler";
version = "2.3";
pyproject = true;
src = fetchFromGitHub {
owner = "django-parler";
repo = "django-parler";
tag = "v${version}";
hash = "sha256-tRGifFPCXF3aa3PQWKw3tl1H1TY+lgcChUP1VdwG1cE=";
};
build-system = [ setuptools ];
dependencies = [ django ];
# Disable failing test: article.tests.AdminArticleTestCase.test_admin_add
# AssertionError: '<h1>Ajout de Article (Hollandais)</h1>' not found in ...
# https://github.com/django-parler/django-parler/issues/358
preCheck = lib.optionalString (lib.versionAtLeast django.version "5.0") ''
rm example/article/tests.py
'';
checkPhase = ''
runHook preCheck
${python.interpreter} runtests.py
runHook postCheck
'';
meta = {
description = "Simple Django model translations without nasty hacks";
homepage = "https://github.com/django-parler/django-parler";
changelog = "https://github.com/django-parler/django-parler/releases/tag/v${version}";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ derdennisop ];
};
}