blob: 4591278dc3c617e9fc8103d21e2a8c3bd2ce0233 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
|
{
lib,
buildPythonPackage,
fetchFromGitHub,
pytestCheckHook,
flit-core,
numpy,
pydicom,
pylibjpeg-data,
pylibjpeg-libjpeg,
pylibjpeg-openjpeg,
pylibjpeg-rle,
}:
buildPythonPackage rec {
pname = "pylibjpeg";
version = "2.1.0";
pyproject = true;
src = fetchFromGitHub {
owner = "pydicom";
repo = "pylibjpeg";
tag = "v${version}";
hash = "sha256-jMdNzruzr2VgEntFF5BBoK3yrq0VegtJNXAkCpHjsks=";
};
build-system = [ flit-core ];
dependencies = [ numpy ];
optional-dependencies =
let
extras = {
libjpeg = [ pylibjpeg-libjpeg ];
openjpeg = [ pylibjpeg-openjpeg ];
rle = [ pylibjpeg-rle ];
};
in
extras // { all = lib.concatLists (lib.attrValues extras); };
nativeCheckInputs = [
pytestCheckHook
pydicom
pylibjpeg-data
pylibjpeg-libjpeg
];
pythonImportsCheck = [ "pylibjpeg" ];
meta = {
description = "Python framework for decoding JPEG images, with a focus on supporting Pydicom";
homepage = "https://github.com/pydicom/pylibjpeg";
changelog = "https://github.com/pydicom/pylibjpeg/releases/tag/v${version}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ bcdarwin ];
};
}
|