2022-08-18 17:37:46 +02:00
|
|
|
{ lib
|
|
|
|
, python3
|
2023-05-25 16:51:30 +02:00
|
|
|
, fetchPypi
|
2022-08-18 17:37:46 +02:00
|
|
|
, wrapGAppsHook
|
|
|
|
, gtk3
|
|
|
|
, librsvg
|
2023-05-25 16:51:30 +02:00
|
|
|
, xorg
|
|
|
|
, argyllcms
|
2022-08-18 17:37:46 +02:00
|
|
|
}:
|
|
|
|
|
|
|
|
python3.pkgs.buildPythonApplication rec {
|
|
|
|
pname = "displaycal";
|
2024-03-20 11:05:55 +01:00
|
|
|
version = "3.9.12";
|
2022-08-18 17:37:46 +02:00
|
|
|
format = "setuptools";
|
|
|
|
|
2023-05-25 16:51:30 +02:00
|
|
|
src = fetchPypi {
|
2022-08-18 17:37:46 +02:00
|
|
|
pname = "DisplayCAL";
|
|
|
|
inherit version;
|
2024-03-20 11:05:55 +01:00
|
|
|
hash = "sha256-0NZ+fr3ilnyWE6+Xa8xqpccNe7WVvvQfQEYvdQ8rf/Q=";
|
2022-08-18 17:37:46 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
wrapGAppsHook
|
|
|
|
gtk3
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = with python3.pkgs; [
|
|
|
|
build
|
|
|
|
certifi
|
2024-01-07 13:35:51 +01:00
|
|
|
wxpython
|
2022-08-18 17:37:46 +02:00
|
|
|
dbus-python
|
|
|
|
distro
|
2023-11-19 07:07:34 +01:00
|
|
|
numpy
|
|
|
|
pillow
|
2023-03-05 18:06:04 +01:00
|
|
|
pychromecast
|
2022-08-18 17:37:46 +02:00
|
|
|
send2trash
|
2023-11-19 07:07:34 +01:00
|
|
|
zeroconf
|
2022-08-18 17:37:46 +02:00
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
gtk3
|
|
|
|
librsvg
|
|
|
|
] ++ (with xorg; [
|
|
|
|
libX11
|
|
|
|
libXxf86vm
|
|
|
|
libXext
|
|
|
|
libXinerama
|
|
|
|
libXrandr
|
|
|
|
]);
|
|
|
|
|
2023-11-19 07:07:34 +01:00
|
|
|
# Workaround for eoyilmaz/displaycal-py3#261
|
|
|
|
setupPyGlobalFlags = [ "appdata" ];
|
|
|
|
|
2022-08-18 17:37:46 +02:00
|
|
|
doCheck = false; # Tests try to access an X11 session and dbus in weird locations.
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "DisplayCAL" ];
|
|
|
|
|
|
|
|
dontWrapGApps = true;
|
|
|
|
|
|
|
|
preFixup = ''
|
|
|
|
makeWrapperArgs+=(
|
|
|
|
''${gappsWrapperArgs[@]}
|
|
|
|
--prefix PATH : ${lib.makeBinPath [ argyllcms ]}
|
|
|
|
--prefix PYTHONPATH : $PYTHONPATH
|
|
|
|
)
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Display calibration and characterization powered by Argyll CMS (Migrated to Python 3)";
|
|
|
|
homepage = "https://github.com/eoyilmaz/displaycal-py3";
|
|
|
|
license = licenses.gpl3Plus;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = with maintainers; [ toastal ];
|
|
|
|
};
|
|
|
|
}
|