git.iko.soy/typeable/nixpkgs
on master help sign in
simple-scan: improvements

Fix missing icon. It was looking for a "scanner" device icon that can be only found as part of gnome3 default theme. Copied this device icon and renamed it as *the* simple-scan application icon.

commite7cc2de7dda5ccb04e6d169158225072e4ff23b9 authorRaymond Gauthier <jraygauthier@gmail.com> dateTue 17 May 2016, 00:49 (11 years ago) parent551296a
1 file changed+21−1
pkgs/applications/graphics/simple-scan/default.nix+21−1
pkgs/applications/graphics/simple-scan/default.nix+21−1
@@ -1,5 +1,6 @@
11{ stdenv, fetchurl, cairo, colord, glib, gtk3, gusb, intltool, itstool
2−, libusb1, libxml2, pkgconfig, sane-backends, vala, wrapGAppsHook }:
2+, libusb1, libxml2, pkgconfig, sane-backends, vala, wrapGAppsHook
3+, gnome3 }:
34
45stdenv.mkDerivation rec {
56 name = "simple-scan-${version}";
@@ -16,11 +17,30 @@ stdenv.mkDerivation rec {
1617
1718 configureFlags = [ "--disable-packagekit" ];
1819
20+ patchPhase = ''
21+ sed -i -e 's#Icon=scanner#Icon=simple-scan#g' ./data/simple-scan.desktop.in
22+ '';
23+
1924 preBuild = ''
2025 # Clean up stale .c files referencing packagekit headers as of 3.20.0:
2126 make clean
2227 '';
2328
29+ postInstall = ''
30+ (
31+ cd ${gnome3.defaultIconTheme}/share/icons/Adwaita
32+
33+ for f in `find . | grep 'scanner\.'`
34+ do
35+ local outFile="`echo "$out/share/icons/hicolor/$f" | sed \
36+ -e 's#/devices/#/apps/#g' \
37+ -e 's#scanner\.#simple-scan\.#g'`"
38+ mkdir -p "`realpath -m "$outFile/.."`"
39+ cp "$f" "$outFile"
40+ done
41+ )
42+ '';
43+
2444 enableParallelBuilding = true;
2545
2646 doCheck = true;