2023-03-04 12:14:45 +00:00
|
|
|
{ lib
|
2024-07-27 06:49:29 +00:00
|
|
|
, python311
|
2023-07-15 17:15:38 +00:00
|
|
|
, fetchPypi
|
2024-05-15 15:35:15 +00:00
|
|
|
, wrapGAppsHook3
|
2023-03-04 12:14:45 +00:00
|
|
|
, gtk3
|
|
|
|
, librsvg
|
2023-07-15 17:15:38 +00:00
|
|
|
, xorg
|
|
|
|
, argyllcms
|
2023-03-04 12:14:45 +00:00
|
|
|
}:
|
|
|
|
|
2024-07-27 06:49:29 +00:00
|
|
|
# wxPython-4.2.1 requires python < 3.12
|
|
|
|
python311.pkgs.buildPythonApplication rec {
|
2023-03-04 12:14:45 +00:00
|
|
|
pname = "displaycal";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "3.9.12";
|
2023-03-04 12:14:45 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
src = fetchPypi {
|
2023-03-04 12:14:45 +00:00
|
|
|
pname = "DisplayCAL";
|
|
|
|
inherit version;
|
2024-04-21 15:54:59 +00:00
|
|
|
hash = "sha256-0NZ+fr3ilnyWE6+Xa8xqpccNe7WVvvQfQEYvdQ8rf/Q=";
|
2023-03-04 12:14:45 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
2024-05-15 15:35:15 +00:00
|
|
|
wrapGAppsHook3
|
2023-03-04 12:14:45 +00:00
|
|
|
gtk3
|
|
|
|
];
|
|
|
|
|
2024-07-27 06:49:29 +00:00
|
|
|
propagatedBuildInputs = with python311.pkgs; [
|
2023-03-04 12:14:45 +00:00
|
|
|
build
|
|
|
|
certifi
|
2024-01-13 08:15:51 +00:00
|
|
|
wxpython
|
2023-03-04 12:14:45 +00:00
|
|
|
dbus-python
|
|
|
|
distro
|
2024-01-02 11:29:13 +00:00
|
|
|
numpy
|
|
|
|
pillow
|
2023-03-15 16:39:30 +00:00
|
|
|
pychromecast
|
2023-03-04 12:14:45 +00:00
|
|
|
send2trash
|
2024-01-02 11:29:13 +00:00
|
|
|
zeroconf
|
2023-03-04 12:14:45 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
gtk3
|
|
|
|
librsvg
|
|
|
|
] ++ (with xorg; [
|
|
|
|
libX11
|
|
|
|
libXxf86vm
|
|
|
|
libXext
|
|
|
|
libXinerama
|
|
|
|
libXrandr
|
|
|
|
]);
|
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
# Workaround for eoyilmaz/displaycal-py3#261
|
|
|
|
setupPyGlobalFlags = [ "appdata" ];
|
|
|
|
|
2023-03-04 12:14:45 +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 ];
|
|
|
|
};
|
|
|
|
}
|