Paste number 330525: | my-udisks.scm |
Pasted by: | Apteryx |
When: | 6 years, 6 months ago |
Share: | Tweet this! | http://paste.lisp.org/+7319 |
Channel: | None |
Paste contents: |
(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 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 "udisks")
(version "2.1.7")
(source (origin
(method url-fetch)
(uri (string-append "https://udisks.freedesktop.org/releases/"
name "-" 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)))
(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
(list "--disable-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.