about summary refs log tree commit diff
path: root/pkgs/misc/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/misc/drivers')
-rw-r--r--pkgs/misc/drivers/argononed/default.nix2
-rw-r--r--pkgs/misc/drivers/epson-escpr2/default.nix35
-rw-r--r--pkgs/misc/drivers/gutenprint/default.nix2
-rw-r--r--pkgs/misc/drivers/hplip/default.nix29
-rw-r--r--pkgs/misc/drivers/hplip/revert-snprintf-change.patch61
-rw-r--r--pkgs/misc/drivers/m33-linux/default.nix2
-rw-r--r--pkgs/misc/drivers/pantum-driver/default.nix6
-rw-r--r--pkgs/misc/drivers/sc-controller/default.nix2
-rw-r--r--pkgs/misc/drivers/utsushi/default.nix2
9 files changed, 46 insertions, 95 deletions
diff --git a/pkgs/misc/drivers/argononed/default.nix b/pkgs/misc/drivers/argononed/default.nix
index 48b5800abb028..320aaf3440504 100644
--- a/pkgs/misc/drivers/argononed/default.nix
+++ b/pkgs/misc/drivers/argononed/default.nix
@@ -8,7 +8,7 @@ stdenv.mkDerivation rec {
     owner = "DarkElvenAngel";
     repo = pname;
     rev = "97c4fa07fc2c09ffc3bd86e0f6319d50fa639578";
-    sha256 = "sha256-5/xUYbprRiwD+FN8V2cUpHxnTbBkEsFG2wfsEXrCrgQ=";
+    hash = "sha256-5/xUYbprRiwD+FN8V2cUpHxnTbBkEsFG2wfsEXrCrgQ=";
   };
 
   patches = [ ./fix-hardcoded-reboot-poweroff-paths.patch ];
diff --git a/pkgs/misc/drivers/epson-escpr2/default.nix b/pkgs/misc/drivers/epson-escpr2/default.nix
index e84cc3b0e3f88..2037b311639b9 100644
--- a/pkgs/misc/drivers/epson-escpr2/default.nix
+++ b/pkgs/misc/drivers/epson-escpr2/default.nix
@@ -1,16 +1,22 @@
-{ lib, stdenv, fetchurl, cups, rpm, cpio }:
+{
+  lib,
+  stdenv,
+  fetchurl,
+  cups,
+  rpm,
+  cpio,
+}:
 
 stdenv.mkDerivation rec {
   pname = "epson-inkjet-printer-escpr2";
-  version = "1.2.11";
+  version = "1.2.12";
 
   src = fetchurl {
-    # To find new versions, visit
-    # http://download.ebz.epson.net/dsc/search/01/search/?OSC=LX and search for
-    # some printer like for instance "WF-7210" to get to the most recent
-    # version.
-    url = "https://download3.ebz.epson.net/dsc/f/03/00/15/93/07/6926ce2857b2e0f563eecfd6a877b7b71898ad46/epson-inkjet-printer-escpr2-1.2.11-1.src.rpm";
-    sha256 = "sha256-WMjtYYuMGMPf6222rvrP5Ep6fMRwebPTUXeQ6CbwEt4=";
+    # To find the most recent version go to
+    # https://support.epson.net/linux/Printer/LSB_distribution_pages/en/escpr2.php
+    # and retreive the download link for source package for x86 CPU
+    url = "https://download3.ebz.epson.net/dsc/f/03/00/15/98/70/f6a682eeeba1fd8bdf2ac112d5e1111d951c64a6/epson-inkjet-printer-escpr2-1.2.12-1.src.rpm";
+    sha256 = "sha256-7OkDlYhfQ/S3OD5QeN7DgNK0+LHabIm8zErtUDYcqwo=";
   };
 
   unpackPhase = ''
@@ -26,7 +32,10 @@ stdenv.mkDerivation rec {
   patches = [ ./cups-filter-ppd-dirs.patch ];
 
   buildInputs = [ cups ];
-  nativeBuildInputs = [ rpm cpio ];
+  nativeBuildInputs = [
+    rpm
+    cpio
+  ];
 
   meta = with lib; {
     homepage = "http://download.ebz.epson.net/dsc/search/01/search/";
@@ -37,8 +46,12 @@ stdenv.mkDerivation rec {
 
       Refer to the description of epson-escpr for usage.
     '';
-    license = licenses.gpl2;
-    maintainers = with maintainers; [ ma9e ma27 shawn8901 ];
+    license = licenses.gpl2Plus;
+    maintainers = with maintainers; [
+      ma9e
+      ma27
+      shawn8901
+    ];
     platforms = platforms.linux;
   };
 }
diff --git a/pkgs/misc/drivers/gutenprint/default.nix b/pkgs/misc/drivers/gutenprint/default.nix
index 8004af7686e18..e2d5b8ec6a82b 100644
--- a/pkgs/misc/drivers/gutenprint/default.nix
+++ b/pkgs/misc/drivers/gutenprint/default.nix
@@ -48,7 +48,7 @@ stdenv.mkDerivation rec {
   meta = with lib; {
     description = "Ghostscript and cups printer drivers";
     homepage = "https://sourceforge.net/projects/gimp-print/";
-    license = licenses.gpl2;
+    license = licenses.gpl2Plus;
     platforms = platforms.linux;
     isGutenprint = true;
   };
diff --git a/pkgs/misc/drivers/hplip/default.nix b/pkgs/misc/drivers/hplip/default.nix
index eb3b84d04529e..b3bc2cf8f411d 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; {
diff --git a/pkgs/misc/drivers/hplip/revert-snprintf-change.patch b/pkgs/misc/drivers/hplip/revert-snprintf-change.patch
deleted file mode 100644
index 2caa98dc2cffa..0000000000000
--- a/pkgs/misc/drivers/hplip/revert-snprintf-change.patch
+++ /dev/null
@@ -1,61 +0,0 @@
-commit f103a260215016fc035bc1399c8accabf83b0264
-Author: Claudio Bley <claudio.bley@gmail.com>
-Date:   Fri Jul 1 22:29:05 2022 +0200
-
-    Revert change to hp_ipp.c from 3.22.{4 -> 6}
-    
-    This fails compilation:
-    ```
-    protocol/hp_ipp.c: In function ‘addCupsPrinter’:
-    protocol/hp_ipp.c:113:9: error: format not a string literal and no format arguments [-Werror=format-security]
-      113 |         snprintf( info,sizeof(info), name );
-          |         ^~~~~~~~
-    ```
-
-diff --git a/protocol/hp_ipp.c b/protocol/hp_ipp.c
-index 97d827d..af7013b 100644
---- a/protocol/hp_ipp.c
-+++ b/protocol/hp_ipp.c
-@@ -110,7 +110,7 @@ int addCupsPrinter(char *name, char *device_uri, char *location, char *ppd_file,
-      }
- 
-      if ( info == NULL )
--        snprintf( info,sizeof(info), name );
-+        strcpy( info, name );
- 
-      sprintf( printer_uri, "ipp://localhost/printers/%s", name );
- 
-@@ -511,27 +511,27 @@ int __parsePrinterAttributes(ipp_t *response, printer_t **printer_list)
- 
-              if ( strcmp(attr_name, "printer-name") == 0 &&
-                                         val_tag == IPP_TAG_NAME ) {
--                  snprintf(t_printer->name, sizeof(t_printer->name),ippGetString(attr, 0, NULL) );
-+                  strcpy(t_printer->name, ippGetString(attr, 0, NULL) );
-              }
-              else if ( strcmp(attr_name, "device-uri") == 0 &&
-                                          val_tag == IPP_TAG_URI ) {
--                  snprintf(t_printer->device_uri,sizeof(t_printer->device_uri), ippGetString(attr, 0, NULL) );
-+                  strcpy(t_printer->device_uri, ippGetString(attr, 0, NULL) );
-              }
-              else if ( strcmp(attr_name, "printer-uri-supported") == 0 &&
-                                                  val_tag == IPP_TAG_URI ) {
--                  snprintf(t_printer->printer_uri,sizeof(t_printer->printer_uri), ippGetString(attr, 0, NULL) );
-+                  strcpy(t_printer->printer_uri, ippGetString(attr, 0, NULL) );
-              }
-              else if ( strcmp(attr_name, "printer-info") == 0 &&
-                                         val_tag == IPP_TAG_TEXT ) {
--                  snprintf(t_printer->info,sizeof(t_printer->info), ippGetString(attr, 0, NULL) );
-+                  strcpy(t_printer->info, ippGetString(attr, 0, NULL) );
-              }
-              else if ( strcmp(attr_name, "printer-location") == 0 &&
-                                            val_tag == IPP_TAG_TEXT ) {
--                  snprintf(t_printer->location,sizeof(t_printer->location),ippGetString(attr, 0, NULL) );
-+                  strcpy(t_printer->location, ippGetString(attr, 0, NULL) );
-              }
-              else if ( strcmp(attr_name, "printer-make-and-model") == 0 &&
-                                                   val_tag == IPP_TAG_TEXT ) {
--                  snprintf(t_printer->make_model,sizeof(t_printer->make_model),ippGetString(attr, 0, NULL) );
-+                  strcpy(t_printer->make_model, ippGetString(attr, 0, NULL) );
-              } 
-              else if ( strcmp(attr_name, "printer-state") == 0 &&
-                                              val_tag == IPP_TAG_ENUM ) {
diff --git a/pkgs/misc/drivers/m33-linux/default.nix b/pkgs/misc/drivers/m33-linux/default.nix
index e7bfbe34ee7f3..9331760ef66bf 100644
--- a/pkgs/misc/drivers/m33-linux/default.nix
+++ b/pkgs/misc/drivers/m33-linux/default.nix
@@ -30,7 +30,7 @@ stdenv.mkDerivation {
     homepage = "https://github.com/donovan6000/M3D-Linux";
     description = "Linux program that can communicate with the Micro 3D printer";
     mainProgram = "m33-linux";
-    license = licenses.gpl2;
+    license = licenses.gpl2Only;
     platforms = platforms.linux;
     maintainers = with maintainers; [ abbradar ];
   };
diff --git a/pkgs/misc/drivers/pantum-driver/default.nix b/pkgs/misc/drivers/pantum-driver/default.nix
index 78a09f969325a..69e973fd95841 100644
--- a/pkgs/misc/drivers/pantum-driver/default.nix
+++ b/pkgs/misc/drivers/pantum-driver/default.nix
@@ -18,11 +18,11 @@ let
 in
 stdenv.mkDerivation rec {
   pname = "pantum-driver";
-  version = "1.1.106";
+  version = "1.1.123";
 
   src = fetchzip {
-    url = "https://drivers.pantum.com/userfiles/files/download/drive/Pantum%20Ubuntu%20Driver%20V1_1_106.zip";
-    hash = "sha256-FzR/wC73dJ4+rqFT+JvTduxzcozJIAs6jADNbmJby+M=";
+    url = "https://github.com/ArticExploit/pantum-driver/releases/download/${version}/Pantum.Ubuntu.Driver.V${builtins.replaceStrings ["."] ["_"] version}.zip";
+    hash = "sha256-TUk6CTnWlSvyG8MOpDRhg/eblAo6X/MDUFOiWuOuro0=";
   };
 
   buildInputs = [ libusb1 libjpeg8 cups ];
diff --git a/pkgs/misc/drivers/sc-controller/default.nix b/pkgs/misc/drivers/sc-controller/default.nix
index e0cf96bd63aa1..2215c5d1d29e2 100644
--- a/pkgs/misc/drivers/sc-controller/default.nix
+++ b/pkgs/misc/drivers/sc-controller/default.nix
@@ -50,7 +50,7 @@ buildPythonApplication rec {
     homepage    = "https://github.com/Ryochan7/sc-controller";
     # donations: https://www.patreon.com/kozec
     description = "User-mode driver and GUI for Steam Controller and other controllers";
-    license     = licenses.gpl2;
+    license     = licenses.gpl2Only;
     platforms   = platforms.linux;
     maintainers = with maintainers; [ orivej rnhmjoj ];
   };
diff --git a/pkgs/misc/drivers/utsushi/default.nix b/pkgs/misc/drivers/utsushi/default.nix
index d4e6c6ed4a96b..1642e91bb109c 100644
--- a/pkgs/misc/drivers/utsushi/default.nix
+++ b/pkgs/misc/drivers/utsushi/default.nix
@@ -21,7 +21,7 @@ in stdenv.mkDerivation rec {
     owner = "utsushi";
     repo = pname;
     rev = version;
-    sha256 = "sha256-CrN9F/WJKmlDN7eozEHtKgGUQBWVwTqwjnrfiATk7lI=";
+    hash = "sha256-CrN9F/WJKmlDN7eozEHtKgGUQBWVwTqwjnrfiATk7lI=";
   };
 
   patches = [