@@ -18,49 +18,47 @@ stdenv.mkDerivation rec {
1818
1919 patches = [ ./detect_serverbindir.patch ];
2020
21− buildInputs =
22− [ intltool pkgconfig glib udev libusb1 cups xmlto
23− libxml2 docbook_xml_dtd_412 docbook_xsl desktop_file_utils
24− pythonPackages.python pythonPackages.wrapPython
25− libnotify gobjectIntrospection gdk_pixbuf pango atk
26− libgnome_keyring3
27− ];
21+ buildInputs = [
22+ intltool pkgconfig glib udev libusb1 cups xmlto
23+ libxml2 docbook_xml_dtd_412 docbook_xsl desktop_file_utils
2824
29− nativeBuildInputs = [ wrapGAppsHook ];
25+ libnotify gobjectIntrospection gdk_pixbuf pango atk
26+ libgnome_keyring3
27+
28+ (pythonPackages.python.withPackages (ps: with ps; [
29+ pycups pycurl dbus-python pygobject3 requests pycairo pysmbc
30+ ]))
31+ ];
3032
31− pythonPath = with pythonPackages; requiredPythonModules [ pycups pycurl dbus-python pygobject3 requests pycairo pysmbc ];
33+ nativeBuildInputs = [ wrapGAppsHook ];
3234
33− configureFlags =
34− [ "--with-udev-rules"
35− "--with-udevdir=$(out)/etc/udev"
36− "--with-systemdsystemunitdir=$(out)/etc/systemd/system"
37− ];
35+ configureFlags = [
36+ "--with-udev-rules"
37+ "--with-udevdir=$(out)/etc/udev"
38+ "--with-systemdsystemunitdir=$(out)/etc/systemd/system"
39+ ];
3840
3941 stripDebugList = [ "bin" "lib" "etc/udev" ];
4042
41− postInstall =
42− ''
43− buildPythonPath "$out $pythonPath"
44− gappsWrapperArgs+=(
45− --prefix PATH : "$program_PATH"
46− --set CUPS_DATADIR "${cups-filters}/share/cups"
47− )
48−
49− find $out/share/system-config-printer -name \*.py -type f -perm -0100 -print0 | while read -d "" f; do
50− patchPythonScript "$f"
51− done
43+ postInstall = ''
44+ gappsWrapperArgs+=(
45+ --prefix PATH : "$program_PATH"
46+ --prefix PYTHONPATH : "$out/${pythonPackages.python.sitePackages}"
47+ --set CUPS_DATADIR "${cups-filters}/share/cups"
48+ )
5249
53− # The below line will be unneeded when the next upstream release arrives.
54− sed -i -e "s|/usr/local/bin|$out/bin|" "$out/share/dbus-1/services/org.fedoraproject.Config.Printing.service"
50+ # The below line will be unneeded when the next upstream release arrives.
51+ sed -i -e "s|/usr/local/bin|$out/bin|" \
52+ "$out/share/dbus-1/services/org.fedoraproject.Config.Printing.service"
5553
56− # Manually expand literal "$(out)", which have failed to expand
57− sed -e "s|ExecStart=\$(out)|ExecStart=$out|" \
58− -i "$out/etc/systemd/system/configure-printer@.service"
59− '';
54+ # Manually expand literal "$(out)", which have failed to expand
55+ sed -e "s|ExecStart=\$(out)|ExecStart=$out|" \
56+ -i "$out/etc/systemd/system/configure-printer@.service"
57+ '';
6058
61− meta = {
59+ meta = with stdenv.lib; {
6260 homepage = http://cyberelk.net/tim/software/system-config-printer/;
63− platforms = stdenv.lib.platforms.linux;
64− license = stdenv.lib.licenses.gpl2;
61+ platforms = platforms.linux;
62+ license = licenses.gpl2;
6563 };
6664}