nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 63 lines 1.7 kB view raw
1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 flit-core, 6 wagtail, 7 dj-database-url, 8 python, 9}: 10 11buildPythonPackage rec { 12 pname = "wagtail-modeladmin"; 13 version = "2.2.0"; 14 pyproject = true; 15 16 src = fetchFromGitHub { 17 owner = "wagtail-nest"; 18 repo = "wagtail-modeladmin"; 19 tag = "v${version}"; 20 hash = "sha256-P75jrH4fMODZHht+RAOd0/MutxsWtmui5Kxk8F/Ew0Q="; 21 }; 22 23 # Fail with `AssertionError` 24 # AssertionError: <Warning: level=30,... > not found in [<Warning: ...>] 25 postPatch = '' 26 substituteInPlace wagtail_modeladmin/test/tests/test_simple_modeladmin.py \ 27 --replace-fail \ 28 "def test_model_with_single_tabbed_panel_only(" \ 29 "def no_test_model_with_single_tabbed_panel_only(" \ 30 --replace-fail \ 31 "def test_model_with_two_tabbed_panels_only(" \ 32 "def no_test_model_with_two_tabbed_panels_only(" 33 ''; 34 35 build-system = [ flit-core ]; 36 37 dependencies = [ 38 wagtail 39 ]; 40 41 nativeCheckInputs = [ dj-database-url ]; 42 43 pythonImportsCheck = [ "wagtail_modeladmin" ]; 44 45 checkPhase = '' 46 runHook preCheck 47 48 # AssertionError: 3 != 1 : Found 3 instances of 'error-message' in response (expected 1) 49 rm wagtail_modeladmin/test/tests/test_simple_modeladmin.py 50 51 ${python.interpreter} testmanage.py test 52 53 runHook postCheck 54 ''; 55 56 meta = { 57 description = "Add any model in your project to the Wagtail admin. Formerly wagtail.contrib.modeladmin"; 58 homepage = "https://github.com/wagtail-nest/wagtail-modeladmin"; 59 changelog = "https://github.com/wagtail/wagtail-modeladmin/blob/${src.tag}/CHANGELOG.md"; 60 license = lib.licenses.bsd3; 61 maintainers = with lib.maintainers; [ sephi ]; 62 }; 63}