diff mbox series

[bug#37975,2/2] gnu: Add udiskie.

Message ID 20191029093135.32727-2-glv@posteo.net
State Accepted
Headers show
Series gnu: Add udiskie. | expand

Commit Message

Guillaume Le Vaillant Oct. 29, 2019, 9:31 a.m. UTC
* gnu/packages/freedesktop.scm (udiskie): New variable.
---
 gnu/packages/freedesktop.scm | 61 ++++++++++++++++++++++++++++++++++++
 1 file changed, 61 insertions(+)

Comments

Pierre Neidhardt Oct. 29, 2019, 11:10 a.m. UTC | #1
Hi Guillaume,

Looking great, just a few nits below:

> +    (arguments
> +     `(;; The tests want libappindicator, which is not available.

Why isn't available?  Should we package it?  URL of the lib?

> +       #:tests? #f
> +       #:phases
> +       (modify-phases %standard-phases
> +         (add-after 'install 'wrap-gi-typelib
> +           (lambda* (#:key outputs #:allow-other-keys)
> +             (let ((out (assoc-ref outputs "out"))
> +                   (gi-typelib-path (getenv "GI_TYPELIB_PATH")))
> +               (wrap-program (string-append out "/bin/udiskie")
> +                 `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path))))
> +             #t)))))
> +    (home-page "https://github.com/coldfix/udiskie")
> +    (synopsis "Automounter for removable media")
> +    (description
> +     "The udiskie program is a udisks2 front-end that allows to manage

@command{udiskie}.

> +removeable media such as CDs or flash drives from userspace.

Typo: removable.

> +
> +Its features include:
> +
> +@itemize
> +@item automount removable media
> +@item notifications
> +@item tray icon
> +@item command line tools for manual un-/mounting

I find the "-/" syntax a bit unconventional.  Maybe "(un)mounting" would be
better.
In doubt, "mounting and unmounting" works in all cases :)

> +@item LUKS encrypted devices
> +@item unlocking with keyfiles
> +@item loop devices (mounting iso archives)

iso => ISO

> +@item password caching
> +@end itemize")

=> @end itemize\n

Also maybe improve the typography of the list, e.g. add commas at the
end of every line and a period for the last line.
Guillaume Le Vaillant Oct. 29, 2019, 2:02 p.m. UTC | #2
Pierre Neidhardt skribis:

>> +    (arguments
>> +     `(;; The tests want libappindicator, which is not available.
>
> Why isn't available?  Should we package it?  URL of the lib?

Apparently libappindicator is a library for the Unity desktop
environment. I think it does not make much sense to add it as Unity is
not in Guix. Instead I added a patch removing the support for
libappindicator from udiskie.
Pierre Neidhardt Oct. 29, 2019, 2:17 p.m. UTC | #3
Guillaume Le Vaillant <glv@posteo.net> writes:

> Apparently libappindicator is a library for the Unity desktop
> environment. I think it does not make much sense to add it as Unity is
> not in Guix. Instead I added a patch removing the support for
> libappindicator from udiskie.

Alright, could you the just explain this in the comment?
Thanks!
diff mbox series

Patch

diff --git a/gnu/packages/freedesktop.scm b/gnu/packages/freedesktop.scm
index b18d71cb98..67d587ee48 100644
--- a/gnu/packages/freedesktop.scm
+++ b/gnu/packages/freedesktop.scm
@@ -15,6 +15,7 @@ 
 ;;; Copyright © 2018 Pierre Neidhardt <mail@ambrevar.xyz>
 ;;; Copyright © 2018 Stefan Stefanović <stefanx2ovic@gmail.com>
 ;;; Copyright © 2019 Reza Alizadeh Majd <r.majd@pantherx.org>
+;;; Copyright © 2019 Guillaume Le Vaillant <glv@posteo.net>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -74,6 +75,7 @@ 
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages polkit)
   #:use-module (gnu packages python)
+  #:use-module (gnu packages python-crypto)
   #:use-module (gnu packages python-xyz)
   #:use-module (gnu packages sqlite)
   #:use-module (gnu packages valgrind)
@@ -1439,3 +1441,62 @@  encoding names are iconv-compatible.")
     ;; This combines code under MPL 1.1, LGPL 2.1+, and GPL 2.0+, so the
     ;; combination is GPL 2.0+.
     (license license:gpl2+)))
+
+(define-public udiskie
+  (package
+    (name "udiskie")
+    (version "1.7.7")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "udiskie" version))
+       (sha256
+        (base32
+         "121g9dkr7drv9igpdbcbkj59x15mm72rzp3198bp50zj0lr4wbvi"))))
+    (build-system python-build-system)
+    (native-inputs
+     `(("asciidoc" ,asciidoc)
+       ("gettext" ,gettext-minimal)
+       ("gobject-introspection" ,gobject-introspection)))
+    (inputs
+     `(("gobject-introspection" ,gobject-introspection)
+       ("gtk+" ,gtk+)
+       ("libnotify" ,libnotify)
+       ("udisks" ,udisks)))
+    (propagated-inputs
+     `(("python-docopt" ,python-docopt)
+       ("python-pygobject" ,python-pygobject)
+       ("python-keyutils" ,python-keyutils)
+       ("python-pyxdg" ,python-pyxdg)
+       ("python-pyyaml" ,python-pyyaml)))
+    (arguments
+     `(;; The tests want libappindicator, which is not available.
+       #:tests? #f
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'install 'wrap-gi-typelib
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let ((out (assoc-ref outputs "out"))
+                   (gi-typelib-path (getenv "GI_TYPELIB_PATH")))
+               (wrap-program (string-append out "/bin/udiskie")
+                 `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path))))
+             #t)))))
+    (home-page "https://github.com/coldfix/udiskie")
+    (synopsis "Automounter for removable media")
+    (description
+     "The udiskie program is a udisks2 front-end that allows to manage
+removeable media such as CDs or flash drives from userspace.
+
+Its features include:
+
+@itemize
+@item automount removable media
+@item notifications
+@item tray icon
+@item command line tools for manual un-/mounting
+@item LUKS encrypted devices
+@item unlocking with keyfiles
+@item loop devices (mounting iso archives)
+@item password caching
+@end itemize")
+    (license license:expat)))