Merge pull request #70931 from symphorien/system-config-printer

system-config-printer: 1.5.11 -> 1.5.12
This commit is contained in:
worldofpeace 2019-10-20 23:39:48 +00:00 committed by GitHub
commit 64468d4121
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 29 additions and 24 deletions

View File

@ -33,6 +33,9 @@ with lib;
pkgs.system-config-printer pkgs.system-config-printer
]; ];
# for $out/bin/install-printer-driver
services.packagekit.enable = true;
}; };
} }

View File

@ -1,47 +1,56 @@
{ stdenv, fetchurl, udev, intltool, pkgconfig, glib, xmlto, wrapGAppsHook { stdenv, fetchFromGitHub, udev, intltool, pkgconfig, glib, xmlto, wrapGAppsHook
, docbook_xml_dtd_412, docbook_xsl , docbook_xml_dtd_412, docbook_xsl
, libxml2, desktop-file-utils, libusb1, cups, gdk-pixbuf, pango, atk, libnotify , libxml2, desktop-file-utils, libusb1, cups, gdk-pixbuf, pango, atk, libnotify
, gobject-introspection, libsecret , gobject-introspection, libsecret, packagekit
, cups-filters , cups-filters
, pythonPackages , python3Packages, autoreconfHook, bash
}: }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "system-config-printer"; pname = "system-config-printer";
version = "1.5.11"; version = "1.5.12";
src = fetchurl { src = fetchFromGitHub {
url = "https://github.com/zdohnal/system-config-printer/releases/download/${version}/${pname}-${version}.tar.xz"; owner = "openPrinting";
sha256 = "1lq0q51bhanirpjjvvh4xiafi8hgpk8r32h0dj6dn3f32z8pib9q"; repo = pname;
rev = version;
sha256 = "1a812jsd9pb02jbz9bq16qj5j6k2kw44g7s1xdqqkg7061rd7mwf";
}; };
prePatch = ''
# for automake
touch README ChangeLog
# for tests
substituteInPlace Makefile.am --replace /bin/bash ${bash}/bin/bash
'';
patches = [ ./detect_serverbindir.patch ]; patches = [ ./detect_serverbindir.patch ];
buildInputs = [ buildInputs = [
glib udev libusb1 cups glib udev libusb1 cups
pythonPackages.python python3Packages.python
libnotify gobject-introspection gdk-pixbuf pango atk libnotify gobject-introspection gdk-pixbuf pango atk packagekit
libsecret libsecret
]; ];
nativeBuildInputs = [ nativeBuildInputs = [
intltool pkgconfig intltool pkgconfig
xmlto libxml2 docbook_xml_dtd_412 docbook_xsl desktop-file-utils xmlto libxml2 docbook_xml_dtd_412 docbook_xsl desktop-file-utils
pythonPackages.wrapPython python3Packages.wrapPython
wrapGAppsHook wrapGAppsHook autoreconfHook
]; ];
pythonPath = with pythonPackages; requiredPythonModules [ pycups pycurl dbus-python pygobject3 requests pycairo pysmbc ]; pythonPath = with python3Packages; requiredPythonModules [ pycups pycurl dbus-python pygobject3 requests pycairo pysmbc ];
configureFlags = [ configureFlags = [
"--with-udev-rules" "--with-udev-rules"
"--with-udevdir=$(out)/etc/udev" "--with-udevdir=${placeholder "out"}/etc/udev"
"--with-systemdsystemunitdir=$(out)/etc/systemd/system" "--with-systemdsystemunitdir=${placeholder "out"}/etc/systemd/system"
]; ];
stripDebugList = [ "bin" "lib" "etc/udev" ]; stripDebugList = [ "bin" "lib" "etc/udev" ];
doCheck = false; # generates shebangs in check phase, too lazy to fix doCheck = true;
postInstall = postInstall =
'' ''
@ -54,20 +63,14 @@ stdenv.mkDerivation rec {
find $out/share/system-config-printer -name \*.py -type f -perm -0100 -print0 | while read -d "" f; do find $out/share/system-config-printer -name \*.py -type f -perm -0100 -print0 | while read -d "" f; do
patchPythonScript "$f" patchPythonScript "$f"
done done
patchPythonScript $out/etc/udev/udev-add-printer
# The below line will be unneeded when the next upstream release arrives.
sed -i -e "s|/usr/local/bin|$out/bin|" "$out/share/dbus-1/services/org.fedoraproject.Config.Printing.service"
# Manually expand literal "$(out)", which have failed to expand
sed -e "s|ExecStart=\$(out)|ExecStart=$out|" \
-i "$out/etc/systemd/system/configure-printer@.service"
substituteInPlace $out/etc/udev/rules.d/70-printers.rules \ substituteInPlace $out/etc/udev/rules.d/70-printers.rules \
--replace "udev-configure-printer" "$out/etc/udev/udev-configure-printer" --replace "udev-configure-printer" "$out/etc/udev/udev-configure-printer"
''; '';
meta = { meta = {
homepage = http://cyberelk.net/tim/software/system-config-printer/; homepage = "https://github.com/openprinting/system-config-printer";
platforms = stdenv.lib.platforms.linux; platforms = stdenv.lib.platforms.linux;
license = stdenv.lib.licenses.gpl2; license = stdenv.lib.licenses.gpl2;
}; };

View File

@ -6426,7 +6426,6 @@ in
system-config-printer = callPackage ../tools/misc/system-config-printer { system-config-printer = callPackage ../tools/misc/system-config-printer {
libxml2 = libxml2Python; libxml2 = libxml2Python;
pythonPackages = python3Packages;
}; };
stricat = callPackage ../tools/security/stricat { }; stricat = callPackage ../tools/security/stricat { };