2022-08-18 15:37:46 +00:00
|
|
|
{ lib
|
|
|
|
, python3
|
2023-05-25 14:51:30 +00:00
|
|
|
, fetchPypi
|
2024-04-26 20:24:03 +00:00
|
|
|
, wrapGAppsHook3
|
2022-08-18 15:37:46 +00:00
|
|
|
, gtk3
|
|
|
|
, librsvg
|
2023-05-25 14:51:30 +00:00
|
|
|
, xorg
|
|
|
|
, argyllcms
|
2022-08-18 15:37:46 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
python3.pkgs.buildPythonApplication rec {
|
|
|
|
pname = "displaycal";
|
2024-03-20 10:05:55 +00:00
|
|
|
version = "3.9.12";
|
2022-08-18 15:37:46 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
2023-05-25 14:51:30 +00:00
|
|
|
src = fetchPypi {
|
2022-08-18 15:37:46 +00:00
|
|
|
pname = "DisplayCAL";
|
|
|
|
inherit version;
|
2024-03-20 10:05:55 +00:00
|
|
|
hash = "sha256-0NZ+fr3ilnyWE6+Xa8xqpccNe7WVvvQfQEYvdQ8rf/Q=";
|
2022-08-18 15:37:46 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
2024-04-26 20:24:03 +00:00
|
|
|
wrapGAppsHook3
|
2022-08-18 15:37:46 +00:00
|
|
|
gtk3
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = with python3.pkgs; [
|
|
|
|
build
|
|
|
|
certifi
|
2024-01-07 12:35:51 +00:00
|
|
|
wxpython
|
2022-08-18 15:37:46 +00:00
|
|
|
dbus-python
|
|
|
|
distro
|
2023-11-19 06:07:34 +00:00
|
|
|
numpy
|
|
|
|
pillow
|
2023-03-05 17:06:04 +00:00
|
|
|
pychromecast
|
2022-08-18 15:37:46 +00:00
|
|
|
send2trash
|
2023-11-19 06:07:34 +00:00
|
|
|
zeroconf
|
2022-08-18 15:37:46 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
gtk3
|
|
|
|
librsvg
|
|
|
|
] ++ (with xorg; [
|
|
|
|
libX11
|
|
|
|
libXxf86vm
|
|
|
|
libXext
|
|
|
|
libXinerama
|
|
|
|
libXrandr
|
|
|
|
]);
|
|
|
|
|
2023-11-19 06:07:34 +00:00
|
|
|
# Workaround for eoyilmaz/displaycal-py3#261
|
|
|
|
setupPyGlobalFlags = [ "appdata" ];
|
|
|
|
|
2022-08-18 15:37:46 +00: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 ];
|
|
|
|
};
|
|
|
|
}
|