unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Pierre Neidhardt <ambrevar@gmail.com>
To: 31939@debbugs.gnu.org
Subject: [bug#31939] [PATCH 13/13] gnu: Add demlo.
Date: Sat, 23 Jun 2018 11:08:07 +0200	[thread overview]
Message-ID: <20180623090807.11708-1-ambrevar@gmail.com> (raw)
In-Reply-To: <20180622183031.3044-12-ambrevar@gmail.com>

* gnu/packages/music.scm (demlo): New variable.
---
 gnu/packages/music.scm | 87 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 87 insertions(+)

diff --git a/gnu/packages/music.scm b/gnu/packages/music.scm
index daefbc57f..c1ec12cd5 100644
--- a/gnu/packages/music.scm
+++ b/gnu/packages/music.scm
@@ -16,6 +16,7 @@
 ;;; Copyright © 2017, 2018 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;; Copyright © 2018 nee <nee.git@hidamari.blue>
 ;;; Copyright © 2018 Stefan Reichör <stefan@xsteve.at>
+;;; Copyright © 2018 Pierre Neidhardt <ambrevar@gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -45,6 +46,7 @@
   #:use-module (guix build-system scons)
   #:use-module (guix build-system glib-or-gtk)
   #:use-module (guix build-system waf)
+  #:use-module (guix build-system go)
   #:use-module (gnu packages)
   #:use-module (gnu packages algebra)
   #:use-module (gnu packages apr)
@@ -122,6 +124,8 @@
   #:use-module (gnu packages xml)
   #:use-module (gnu packages xorg)
   #:use-module (gnu packages xiph)
+  #:use-module (gnu packages golang)
+  #:use-module (gnu packages lua)
   #:use-module ((srfi srfi-1) #:select (last)))
 
 (define-public aria-maestosa
@@ -4004,3 +4008,86 @@ ISRCs and the MCN (=UPC/EAN) from disc.")
 mb_client, is a development library geared towards developers who wish to add
 MusicBrainz lookup capabilities to their applications.")
     (license license:lgpl2.1+)))
+
+(define-public demlo
+  (let ((commit "fe9ec4c8ac2fa995ec18e6ac86d50d46df06ec01")
+        (revision "0"))
+    (package
+      (name "demlo")
+      (version (git-version "3.8" revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url
+                "https://gitlab.com/ambrevar/demlo")
+               (commit commit)))
+         (file-name (git-file-name name version))
+         (sha256
+          (base32
+           "1afkbqhzn6da7zaf5ab7dvyqj1izqhzprwfb4hw448fllda9bdvk"))))
+      (build-system go-build-system)
+      (native-inputs
+       `(("lua" ,lua)
+         ("go-github-com-mattn-go-isatty" ,go-github-com-mattn-go-isatty)
+         ("go-github-com-mattn-go-colorable" ,go-github-com-mattn-go-colorable)
+         ("go-github-com-aarzilli-golua" ,go-github-com-aarzilli-golua)
+         ("go-gitlab-com-ambrevar-damerau" ,go-gitlab-com-ambrevar-damerau)
+         ("go-gitlab-com-ambrevar-golua-unicode" ,go-gitlab-com-ambrevar-golua-unicode)
+         ("go-github-com-mgutz-ansi" ,go-github-com-mgutz-ansi)
+         ("go-github-com-michiwend-gomusicbrainz" ,go-github-com-michiwend-gomusicbrainz)
+         ("go-github-com-stevedonovan-luar" ,go-github-com-stevedonovan-luar)
+         ("go-github-com-wtolson-go-taglib" ,go-github-com-wtolson-go-taglib)
+         ("go-github-com-yookoala-realpath" ,go-github-com-yookoala-realpath)))
+      (inputs
+       `(("chromaprint" ,chromaprint)
+         ("ffmpeg" ,ffmpeg)))
+      (arguments
+       `(#:import-path "gitlab.com/ambrevar/demlo"
+         #:phases
+         (modify-phases %standard-phases
+           (add-after 'install 'wrap-program
+             (lambda* (#:key inputs outputs #:allow-other-keys)
+               (let ((out (assoc-ref outputs "out"))
+                     (ffmpeg (assoc-ref inputs "ffmpeg"))
+                     (chromaprint (assoc-ref inputs "chromaprint")))
+                 (wrap-program (string-append out "/bin/demlo")
+                   `("XDG_DATA_DIRS" ":" prefix (,out))
+                   `("PATH" ":" prefix
+                     ,(map (lambda (dir)
+                             (string-append dir "/bin:"
+                                            dir "/sbin"))
+                           (list ffmpeg chromaprint))))
+                 #t)))
+           (add-after 'install-source 'install-scripts
+             (lambda* (#:key outputs #:allow-other-keys)
+               (let* ((out (assoc-ref outputs "out"))
+                      (root (string-append out "/src/gitlab.com/ambrevar/demlo"))
+                      (xdg-data-dirs (string-append out "/demlo")))
+                 (copy-recursively (string-append root "/actions") (string-append xdg-data-dirs "/actions"))
+                 (copy-recursively (string-append root "/scripts") (string-append xdg-data-dirs "/scripts"))
+                 (install-file (string-append root "/config.lua") xdg-data-dirs)
+                 ;; TODO: Test fish completion.
+                 (install-file (string-append root "/completion/demlo.fish") (string-append out "/share/fish/vendor_completions.d"))
+                 #t))))))
+      (home-page "https://gitlab.com/ambrevar/demlo")
+      (synopsis "Dynamic and extensible music library organizer")
+      (description "Demlo is a music library organizer.  It can encode, fix
+case, change folder hierarchy according to tags or file properties, tag from
+an online database, copy covers while ignoring duplicates or those below a
+quality threshold, and much more.  It makes it possible to manage your
+libraries uniformly and dynamically.  You can write your own rules to fit your
+needs best.
+
+Demlo can address any of these recurring music library issues (and much more):
+
+@itemize
+@item Fix the lack of folder structure.
+@item Normalize tags, fix their case, chose which tags to keep and which to
+discard.
+@item Handle lossy and lossless audio differently.
+@item Handle mp3 id3tags hell…
+@item Handle multiple covers, whether embedded and/or external, resize covers,
+discard bad quality ones.
+@end itemize\n")
+      (license license:bsd-style))))
-- 
2.17.1

  reply	other threads:[~2018-06-23  9:09 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-22 18:27 [bug#31939] [PATCH 01/13] gnu: Add go-github-com-mattn-go-isatty Pierre Neidhardt
2018-06-22 18:30 ` [bug#31939] [PATCH 02/13] gnu: Add go-github-com-mattn-go-colorable Pierre Neidhardt
2018-06-22 18:30   ` [bug#31939] [PATCH 03/13] gnu: Add go-github-com-mgutz-ansi Pierre Neidhardt
2018-06-22 18:30   ` [bug#31939] [PATCH 04/13] gnu: Add go-github-com-aarzilli-golua Pierre Neidhardt
2018-06-22 18:30   ` [bug#31939] [PATCH 05/13] gnu: Add go-gitlab-com-ambrevar-golua-unicode Pierre Neidhardt
2018-06-22 18:30   ` [bug#31939] [PATCH 06/13] gnu: Add go-github-com-yookoala-realpath Pierre Neidhardt
2018-06-22 18:30   ` [bug#31939] [PATCH 07/13] gnu: Add go-gitlab-com-ambrevar-damerau Pierre Neidhardt
2018-06-22 18:30   ` [bug#31939] [PATCH 08/13] gnu: Add go-github-com-stevedonovan-luar Pierre Neidhardt
2018-07-13 12:25     ` Ludovic Courtès
2018-06-22 18:30   ` [bug#31939] [PATCH 09/13] gnu: Add go-github-com-kr-text Pierre Neidhardt
2018-06-22 18:30   ` [bug#31939] [PATCH 10/13] gnu: Add go-github-com-michiwend-golang-pretty Pierre Neidhardt
2018-06-22 18:30   ` [bug#31939] [PATCH 11/13] gnu: Add go-github-com-michiwend-gomusicbrainz Pierre Neidhardt
2018-06-22 18:30   ` [bug#31939] [PATCH 12/13] gnu: Add go-github-com-wtolson-go-taglib Pierre Neidhardt
2018-06-22 18:30   ` [bug#31939] [PATCH 13/13] gnu: Add demlo Pierre Neidhardt
2018-06-23  9:08     ` Pierre Neidhardt [this message]
2018-07-13 12:27     ` Ludovic Courtès
2018-06-23  9:08 ` [bug#31939] [PATCH 01/13] gnu: Add go-github-com-mattn-go-isatty Pierre Neidhardt
2018-07-13 12:31 ` Ludovic Courtès
2018-07-16 21:22   ` Pierre Neidhardt
2018-07-17  8:11     ` Ludovic Courtès
2018-07-22 21:02       ` Pierre Neidhardt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180623090807.11708-1-ambrevar@gmail.com \
    --to=ambrevar@gmail.com \
    --cc=31939@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).