summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/fabio/default.nix
blob: 38b6f00bedb461b55fd712d134d52110a6114d4b (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
58
{
  buildPythonPackage,
  ninja,
  fetchPypi,
  meson,
  lib,
  cython,
  meson-python,
  numpy,
  lxml,
  h5py,
  hdf5plugin,
  pillow,
  tomli,
}:

buildPythonPackage rec {
  pname = "fabio";
  version = "2025.10.0";
  pyproject = true;

  src = fetchPypi {
    inherit pname version;
    hash = "sha256-wZdjvPoCp4pQfz2RS1ZKiZfIimqntPh/nbTOf6OX0lY=";
  };

  pythonImportsCheck = [ "fabio" ];

  nativeBuildInputs = [
    meson
    cython
    meson-python
    ninja
  ];

  # While building, it tries to run version.py, which has a #!/usr/bin/env python3 shebang
  postPatch = ''
    patchShebangs --build version.py
  '';

  dependencies = [
    numpy
    lxml
    h5py
    hdf5plugin
    pillow
    tomli
  ];

  meta = {
    changelog = "https://github.com/silx-kit/fabio/blob/main/doc/source/Changelog.rst";
    description = "I/O library for images produced by 2D X-ray detector";
    homepage = "https://github.com/silx-kit/fabio";
    license = [ lib.licenses.mit ];
    maintainers = [ lib.maintainers.pmiddend ];
  };

}