diff options
Diffstat (limited to 'pkgs/misc/drivers/hplip/default.nix')
-rw-r--r-- | pkgs/misc/drivers/hplip/default.nix | 31 |
1 files changed, 15 insertions, 16 deletions
diff --git a/pkgs/misc/drivers/hplip/default.nix b/pkgs/misc/drivers/hplip/default.nix index eb3b84d04529e..fa3c2aad09fde 100644 --- a/pkgs/misc/drivers/hplip/default.nix +++ b/pkgs/misc/drivers/hplip/default.nix @@ -1,6 +1,6 @@ { lib, stdenv, fetchurl, substituteAll -, pkg-config, autoreconfHook -, cups, zlib, libjpeg, libusb1, python3Packages, sane-backends +, pkg-config, autoreconfHook, gobject-introspection, wrapGAppsHook3 +, cups, zlib, libjpeg, libusb1, python311Packages, sane-backends , dbus, file, ghostscript, usbutils , net-snmp, openssl, perl, nettools, avahi , bash, util-linux @@ -14,16 +14,16 @@ let pname = "hplip"; - version = "3.23.8"; + version = "3.24.4"; src = fetchurl { url = "mirror://sourceforge/hplip/${pname}-${version}.tar.gz"; - hash = "sha256-98wF9ijAz9dQ5UrkFDHB390p6XaC8YtcW6XLLFtLG0Y="; + hash = "sha256-XXZDgxiTpeKt351C1YGl2/5arwI2Johrh2LFZF2g8fs="; }; plugin = fetchurl { url = "https://developers.hp.com/sites/default/files/${pname}-${version}-plugin.run"; - hash = "sha256-frsgye3f0M3HE2trKRlfFvMnDEwe+z74IumCdVPrcSY="; + hash = "sha256-Hzxr3SVmGoouGBU2VdbwbwKMHZwwjWnI7P13Z6LQxao="; }; hplipState = substituteAll { @@ -49,7 +49,7 @@ in assert withPlugin -> builtins.elem hplipArch pluginArches || throw "HPLIP plugin not supported on ${stdenv.hostPlatform.system}"; -python3Packages.buildPythonApplication { +python311Packages.buildPythonApplication { inherit pname version src; format = "other"; @@ -74,15 +74,16 @@ python3Packages.buildPythonApplication { pkg-config removeReferencesTo autoreconfHook + gobject-introspection + wrapGAppsHook3 ] ++ lib.optional withQt5 qt5.wrapQtAppsHook; - pythonPath = with python3Packages; [ + pythonPath = with python311Packages; [ dbus pillow pygobject3 reportlab usbutils - sip4 dbus-python distro ] ++ lib.optionals withQt5 [ @@ -105,9 +106,6 @@ python3Packages.buildPythonApplication { url = "https://web.archive.org/web/20230226174550/https://sources.debian.org/data/main/h/hplip/3.22.10+dfsg0-1/debian/patches/0028-Remove-ImageProcessor-binary-installs.patch"; sha256 = "sha256:18njrq5wrf3fi4lnpd1jqmaqr7ph5d7jxm7f15b1wwrbxir1rmml"; }) - - # Revert changes that break compilation under -Werror=format-security - ./revert-snprintf-change.patch ]; postPatch = '' @@ -127,7 +125,7 @@ python3Packages.buildPythonApplication { -e s,/usr/bin/perl,${perl}/bin/perl,g \ -e s,/usr/bin/file,${file}/bin/file,g \ -e s,/usr/bin/gs,${ghostscript}/bin/gs,g \ - -e s,/usr/share/cups/fonts,${ghostscript}/share/ghostscript/fonts,g \ + -e s,/usr/share/cups/fonts,${ghostscript.fonts}/share/fonts,g \ -e "s,ExecStart=/usr/bin/python /usr/bin/hp-config_usb_printer,ExecStart=$out/bin/hp-config_usb_printer,g" \ -e s,Exec=/usr/bin/hp-uiscan,Exec=hp-uiscan,g \ -e s,Icon=/usr/share/icons/Humanity/devices/48/printer.svg,Icon=printer,g \ @@ -239,7 +237,8 @@ python3Packages.buildPythonApplication { # 1. Calling patchPythonProgram on the original script in $out/share/hplip # 2. Making our own wrapper pointing directly to the original script. dontWrapPythonPrograms = true; - # We also avoid double wrapping in case we add qt5 support + # We also avoid double (or triple in case qt5 support is added) wrapping + dontWrapGApps = true; dontWrapQtApps = true; preFixup = '' buildPythonPath "$out $pythonPath" @@ -253,7 +252,7 @@ python3Packages.buildPythonApplication { ${if withQt5 then "makeQtWrapper" else "makeWrapper"} "$py" "$bin" \ --prefix PATH ':' "$program_PATH" \ --set PYTHONNOUSERSITE "true" \ - $makeWrapperArgs + $makeWrapperArgs "''${gappsWrapperArgs[@]}" done ''; @@ -272,7 +271,7 @@ python3Packages.buildPythonApplication { # There are some binaries there, which reference gcc-unwrapped otherwise. stripDebugList = [ - "share/hplip" "lib/cups/backend" "lib/cups/filter" python3Packages.python.sitePackages "lib/sane" + "share/hplip" "lib/cups/backend" "lib/cups/filter" python311Packages.python.sitePackages "lib/sane" ]; meta = with lib; { @@ -283,6 +282,6 @@ python3Packages.buildPythonApplication { then licenses.unfree else with licenses; [ mit bsd2 gpl2Plus ]; platforms = [ "i686-linux" "x86_64-linux" "armv6l-linux" "armv7l-linux" "aarch64-linux" ]; - maintainers = with maintainers; [ ttuegel arthsmn ]; + maintainers = with maintainers; [ ttuegel ]; }; } |