~ruther/guix-local

a8e44804802b65cb27736952bf6ad092113e398a — Sharlatan Hellseher 1 year, 1 month ago 2fec3dd
gnu: ipp-usb: Install man and udev.

* gnu/packages/printers.scm (ipp-usb)
[arguments] <phases>: Add 'install-manual-page and 'install-udev-rules.
[native-inputs]: Remove ronn; add go-github-com-go-md2man.

Change-Id: Ie158295ead9d9791e5e99161f93428d995d76a21
1 files changed, 22 insertions(+), 5 deletions(-)

M gnu/packages/printers.scm
M gnu/packages/printers.scm => gnu/packages/printers.scm +22 -5
@@ 2,6 2,7 @@
;;; Copyright © 2018 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2024 Herman Rimm <herman@rimm.ee>
;;; Copyright © 2025 Sharlatan Hellseher <sharlatanus@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;


@@ 54,16 55,32 @@
    (build-system go-build-system)
    (arguments
     (list
      ;; TODO: The project provides manpages and udev rules, review them and
      ;; install in the next update cycle.
      #:install-source? #f
      #:import-path "github.com/OpenPrinting/ipp-usb"))
      #:import-path "github.com/OpenPrinting/ipp-usb"
      #:phases
      #~(modify-phases %standard-phases
          (add-after 'install 'install-manual-page
            (lambda* (#:key import-path #:allow-other-keys)
              (with-directory-excursion (string-append "src/" import-path)
                (let* ((man (string-append #$output "/share/man/man8")))
                  (mkdir-p man)
                  (invoke "go-md2man"
                          "-in" "ipp-usb.8.md"
                          "-out" (string-append man "/ipp-usb.8"))))))
          (add-after 'install 'install-udev-rules
            (lambda* (#:key import-path #:allow-other-keys)
              (with-directory-excursion (string-append "src/" import-path)
                (substitute* "systemd-udev/71-ipp-usb.rules"
                  (("systemd") "shephard")
                  ((", ENV\\{SYSTEMD_WANTS\\}\\+=\"ipp-usb.service\"") ""))
                (install-file "systemd-udev/71-ipp-usb.rules"
                              (string-append #$output "/lib/udev/rules.d"))))))))
    (inputs
     (list avahi libusb))
    (native-inputs
     (list go-github-com-openprinting-goipp
           pkg-config
           ronn))
           go-github-com-go-md2man
           pkg-config))
    (home-page "https://github.com/OpenPrinting/ipp-usb")
    (synopsis "HTTP reverse proxy, backed by the IPP-over-USB connection")
    (description