nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 buildPythonPackage,
4 django,
5 fetchFromGitHub,
6 pillow,
7 reportlab,
8 svglib,
9 pytestCheckHook,
10 pytest-django,
11 setuptools,
12 testfixtures,
13}:
14
15buildPythonPackage rec {
16 pname = "easy-thumbnails";
17 version = "2.10.1";
18 pyproject = true;
19
20 src = fetchFromGitHub {
21 owner = "SmileyChris";
22 repo = "easy-thumbnails";
23 tag = version;
24 hash = "sha256-GPZ99OaQRSogS8gJXz8rVUjUeNkEk019TYx0VWa0Q6I=";
25 };
26
27 build-system = [ setuptools ];
28
29 dependencies = [
30 django
31 pillow
32 ];
33
34 optional-dependencies.svg = [
35 reportlab
36 svglib
37 ];
38
39 nativeCheckInputs = [
40 pytestCheckHook
41 pytest-django
42 ]
43 ++ lib.concatAttrValues optional-dependencies;
44
45 checkInputs = [ testfixtures ];
46
47 disabledTests = [
48 # AssertionError: 'ERROR' != 'INFO'
49 "test_postprocessor"
50 ];
51
52 preCheck = ''
53 export DJANGO_SETTINGS_MODULE="easy_thumbnails.tests.settings"
54 '';
55
56 pythonImportsCheck = [ "easy_thumbnails" ];
57
58 meta = {
59 description = "Easy thumbnails for Django";
60 homepage = "https://github.com/SmileyChris/easy-thumbnails";
61 changelog = "https://github.com/SmileyChris/easy-thumbnails/blob/${src.tag}/CHANGES.rst";
62 license = lib.licenses.bsd3;
63 maintainers = [ lib.maintainers.onny ];
64 };
65}