Paste number 330614: udisks with manpage

Paste number 330614: udisks with manpage
Pasted by: Apteryx
When:5 years, 9 months ago
Share:Tweet this! | http://paste.lisp.org/+733Q
Channel:None
Paste contents:
Raw Source | XML | Display As
(define-module (my-packages my-udisks)
  #:use-module ((guix licenses) #:prefix license:)
  #:use-module (guix packages)
  #:use-module (guix download)
  #:use-module (guix build-system gnu)
  #:use-module (gnu packages glib)
  #:use-module (gnu packages pkg-config)
  #:use-module (gnu packages xml)
  #:use-module (gnu packages docbook)
  #:use-module (gnu packages acl)
  #:use-module (gnu packages freedesktop)
  #:use-module (gnu packages gnome)
  #:use-module (gnu packages polkit)
  #:use-module (gnu packages linux))

(define-public my-udisks
  (package
    (name "my-udisks")
    (version "2.1.7")
    (source (origin
              (method url-fetch)
              (uri (string-append "https://udisks.freedesktop.org/releases/"
                                  "udisks" "-" version ".tar.bz2"))
              (sha256
               (base32
                "119pr2zbff8vkwlhghim7d7ir24c1dil9hp4q49wm4f6pnrjpbmb"))))
    (build-system gnu-build-system)
    (native-inputs
     `(("glib:bin" ,glib "bin") ; for glib-mkenums
       ("gobject-introspection" ,gobject-introspection)
       ("intltool" ,intltool)
       ("pkg-config" ,pkg-config)
       ("xsltproc" ,libxslt)
       ("docbook-xsl" ,docbook-xsl))) ; required to build the manpage
    (propagated-inputs
     `(("glib" ,glib))) ; required by udisks2.pc
    (inputs
     `(("acl" ,acl)
       ("libatasmart" ,libatasmart)
       ("libgudev" ,libgudev)
       ("polkit" ,polkit)
       ("util-linux" ,util-linux)))
    (outputs '("out"
               "doc"))                            ;5 MiB of gtk-doc HTML
    (arguments
     `(#:tests? #f ; requiring system message dbus
       #:disallowed-references ("doc")            ;enforce separation of "doc"
       #:configure-flags
       (let* ((docbook-xsl-name-version ,(string-append
                                          (package-name docbook-xsl) "-"
                                          (package-version  docbook-xsl)))
              (docbook-catalog-file (string-append ,docbook-xsl
                                                   "/xml/xsl/"
                                                   docbook-xsl-name-version
                                                   "catalog.xml")))
         ;; We must reference the docbook catalog to build the manpage.
         (list (string-append "XML_CATALOG_FILES="  docbook-catalog-file)
               "--enable-man"
               "--localstatedir=/var"
               "--enable-fhs-media"     ;mount devices in /media, not /run/media
               (string-append "--with-html-dir="
                              (assoc-ref %outputs "doc")
                              "/share/doc/udisks/html")
               (string-append "--with-udevdir=" %output "/lib/udev")))
       #:phases
       (modify-phases %standard-phases
         (add-before
             'configure 'fix-girdir
           (lambda _
             ;; Install introspection data to its own output.
             (substitute* "udisks/Makefile.in"
               (("girdir = .*")
                "girdir = $(datadir)/gir-1.0\n")
               (("typelibsdir = .*")
                "typelibsdir = $(libdir)/girepository-1.0\n"))))
         (add-after 'install 'set-mount-file-name
           (lambda* (#:key outputs inputs #:allow-other-keys)
             ;; Tell 'udisksd' where to find the 'mount' command.
             (let ((out   (assoc-ref outputs "out"))
                   (utils (assoc-ref inputs "util-linux")))
               (wrap-program (string-append out "/libexec/udisks2/udisksd")
                 `("PATH" ":" prefix
                   (,(string-append utils "/bin") ;for 'mount'
                    "/run/current-system/profile/bin"
                    "/run/current-system/profile/sbin")))
               #t))))))
    (home-page "http://www.freedesktop.org/wiki/Software/udisks/")
    (synopsis "Disk manager service")
    (description
     "UDisks provides interfaces to enumerate and perform operations on disks
and storage devices.  Any application (including unprivileged ones) can access
the udisksd(8) daemon via the name org.freedesktop.UDisks2 on the system
message bus.")
    ;; The dynamic library are under LGPLv2+, others are GPLv2+.
    (license (list license:gpl2+ license:lgpl2.0+))))

This paste has no annotations.

Colorize as:
Show Line Numbers

Lisppaste pastes can be made by anyone at any time. Imagine a fearsomely comprehensive disclaimer of liability. Now fear, comprehensively.