about summary refs log tree commit diff
path: root/pkgs/misc
diff options
context:
space:
mode:
authorMartin Weinelt <hexa@darmstadt.ccc.de>2023-03-21 12:35:40 +0100
committerMartin Weinelt <hexa@darmstadt.ccc.de>2023-03-21 12:35:53 +0100
commitffe3165b271f3e2d47d0f342f4b906cf378caae9 (patch)
tree6049b0fd23df54bd5a60b13e7652832f3cd0d275 /pkgs/misc
parent9434136df388462ad7562f16b78cd94ff8a3c5e6 (diff)
parent3d50e8355068c139197870753528954887656ccf (diff)
Merge remote-tracking branch 'origin/master' into staging-next
Conflicts:
- nixos/doc/manual/release-notes/rl-2305.section.md
Diffstat (limited to 'pkgs/misc')
-rw-r--r--pkgs/misc/drivers/hplip/default.nix11
1 files changed, 10 insertions, 1 deletions
diff --git a/pkgs/misc/drivers/hplip/default.nix b/pkgs/misc/drivers/hplip/default.nix
index a300ff2ae6349..3b87a0ac12b1b 100644
--- a/pkgs/misc/drivers/hplip/default.nix
+++ b/pkgs/misc/drivers/hplip/default.nix
@@ -127,6 +127,9 @@ python3Packages.buildPythonApplication {
       -e s,/usr/bin/gs,${ghostscript}/bin/gs,g \
       -e s,/usr/share/cups/fonts,${ghostscript}/share/ghostscript/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 \
+      -e s,Icon=@abs_datadir@/hplip/data/images/128x128/hp_logo.png,Icon=hp_logo,g \
       {} +
 
     echo 'AUTOMAKE_OPTIONS = foreign' >> Makefile.am
@@ -180,7 +183,13 @@ python3Packages.buildPythonApplication {
   # Running `hp-diagnose_plugin -g` can be used to diagnose
   # issues with plugins.
   #
-  postInstall = lib.optionalString withPlugin ''
+  postInstall = ''
+    for resolution in 16x16 32x32 64x64 128x128 256x256; do
+      mkdir -p $out/share/icons/hicolor/$resolution/apps
+      ln -s $out/share/hplip/data/images/$resolution/hp_logo.png \
+        $out/share/icons/hicolor/$resolution/apps/hp_logo.png
+    done
+  '' + lib.optionalString withPlugin ''
     sh ${plugin} --noexec --keep
     cd plugin_tmp