From 8e89e1cd8bca8cbb86c1aa5c7ca0a58418d1bf6e Mon Sep 17 00:00:00 2001 From: Kranzes Date: Thu, 18 Aug 2022 18:37:46 +0300 Subject: [PATCH] displaycal: init at 3.9.10 --- .../graphics/displaycal/default.nix | 68 +++++++++++++++++++ pkgs/top-level/aliases.nix | 1 - pkgs/top-level/all-packages.nix | 2 + 3 files changed, 70 insertions(+), 1 deletion(-) create mode 100644 pkgs/applications/graphics/displaycal/default.nix diff --git a/pkgs/applications/graphics/displaycal/default.nix b/pkgs/applications/graphics/displaycal/default.nix new file mode 100644 index 000000000000..3f5fc3d12f76 --- /dev/null +++ b/pkgs/applications/graphics/displaycal/default.nix @@ -0,0 +1,68 @@ +{ lib +, python3 +, xorg +, argyllcms +, wrapGAppsHook +, gtk3 +, librsvg +}: + +python3.pkgs.buildPythonApplication rec { + pname = "displaycal"; + version = "3.9.10"; + format = "setuptools"; + + src = python3.pkgs.fetchPypi { + pname = "DisplayCAL"; + inherit version; + hash = "sha256-oDHDVb0zuAC49yPfmNe7xuFKaA1BRZGr75XwsLqugHs="; + }; + + nativeBuildInputs = [ + wrapGAppsHook + gtk3 + ]; + + propagatedBuildInputs = with python3.pkgs; [ + build + certifi + wxPython_4_2 + dbus-python + distro + PyChromecast + send2trash + ]; + + buildInputs = [ + gtk3 + librsvg + ] ++ (with xorg; [ + libX11 + libXxf86vm + libXext + libXinerama + libXrandr + ]); + + 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 ]; + }; +} diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index d2b58a7f6b05..f51ae47bfbc3 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -371,7 +371,6 @@ mapAliases ({ digikam5 = throw "'digikam5' has been renamed to/replaced by 'digikam'"; # Converted to throw 2022-02-22 dirmngr = throw "dirmngr has been removed: merged into gnupg"; # Added 2022-05-13 disper = throw "disper has been removed: abandoned by upstream"; # Added 2022-03-18 - displaycal = throw "displaycal has been removed from nixpkgs, as it hasn't migrated to python3"; # Added 2022-01-12 dmtx = throw "'dmtx' has been renamed to/replaced by 'dmtx-utils'"; # Converted to throw 2022-02-22 dnnl = oneDNN; # Added 2020-04-22 docbook5_xsl = throw "'docbook5_xsl' has been renamed to/replaced by 'docbook_xsl_ns'"; # Converted to throw 2022-02-22 diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index db484dc52a90..d2e1a20bea46 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -25759,6 +25759,8 @@ with pkgs; disk_indicator = callPackage ../os-specific/linux/disk-indicator { }; + displaycal = callPackage ../applications/graphics/displaycal { }; + displaylink = callPackage ../os-specific/linux/displaylink { inherit (linuxPackages) evdi; };