diff mbox

gnu: Add denemo.

Message ID 87r35ikzjw.fsf@openmailbox.org
State New
Headers show

Commit Message

Kei Yamashita Dec. 8, 2016, 7:09 p.m. UTC
Here is an updated patch for GNU Denemo.

Everything seems fine except for grafting (i.e. disabling grafting
renders the issue invisible). For some reason, "find-files"
does not recognize a file with a Unicode-encoded filename when called
inside "rename-matching-files" from guix/build/graft.scm. When
"find-files" is used on its own, the file is recognized properly.
Is anyone familiar with the grafting code available to help figure out
what is happening to the file name?

Thank you.
From 6bd5843bef06a02ecf1235090350562c8b096aca Mon Sep 17 00:00:00 2001
From: Kei Kebreau <kei@openmailbox.org>
Date: Thu, 8 Dec 2016 14:00:43 -0500
Subject: [PATCH] gnu: Add denemo.

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

Comments

Ludovic Courtès Dec. 9, 2016, 9:43 p.m. UTC | #1
Kei Kebreau <kei@openmailbox.org> skribis:

> Here is an updated patch for GNU Denemo.

Nice work!

> Everything seems fine except for grafting (i.e. disabling grafting
> renders the issue invisible). For some reason, "find-files"
> does not recognize a file with a Unicode-encoded filename when called
> inside "rename-matching-files" from guix/build/graft.scm. When
> "find-files" is used on its own, the file is recognized properly.
> Is anyone familiar with the grafting code available to help figure out
> what is happening to the file name?

Problem is that the grafting code (‘graft-derivation/shallow’ in (guix
grafts)) is running in the C locale, so it expects file names to be
ASCII.  I’ll look into it.

Some comments on the package:

> From 6bd5843bef06a02ecf1235090350562c8b096aca Mon Sep 17 00:00:00 2001
> From: Kei Kebreau <kei@openmailbox.org>
> Date: Thu, 8 Dec 2016 14:00:43 -0500
> Subject: [PATCH] gnu: Add denemo.
>
> * gnu/packages/music.scm (denemo): New variable.

[...]

> +    (arguments
> +     `(#:phases
> +       (modify-phases %standard-phases
> +         (replace 'check
> +           (lambda _
> +             (zero? (system* "make" "-C" "tests" "check")))))))

Is this really needed?  Perhaps leave a comment explaining whether/why
“make check” at the top level is broken (and perhaps report it as a bug
upstream!).

> +    (native-inputs
> +     `(("autoconf" ,autoconf)
> +       ("automake" ,automake)

This is not needed (or it’s a bug too ;-)).

> +    (license (list license:cc-by-sa3.0
> +                   license:lgpl2.1+
> +                   license:gpl2
> +                   license:gpl2+
> +                   license:gpl3
> +                   license:gpl3+))))

I think ‘gpl3+’ is enough here since it “wins”.  You can leave a comment
explaining where the other licenses appear, though.

Thanks!

Ludo’.
Ludovic Courtès Dec. 9, 2016, 10:33 p.m. UTC | #2
ludo@gnu.org (Ludovic Courtès) skribis:

> Kei Kebreau <kei@openmailbox.org> skribis:

[...]

>> Everything seems fine except for grafting (i.e. disabling grafting
>> renders the issue invisible). For some reason, "find-files"
>> does not recognize a file with a Unicode-encoded filename when called
>> inside "rename-matching-files" from guix/build/graft.scm. When
>> "find-files" is used on its own, the file is recognized properly.
>> Is anyone familiar with the grafting code available to help figure out
>> what is happening to the file name?
>
> Problem is that the grafting code (‘graft-derivation/shallow’ in (guix
> grafts)) is running in the C locale, so it expects file names to be
> ASCII.  I’ll look into it.

Looking closer into it, may I suggest renaming the file in question?
:-)

The real fix would be for ‘graft-derivation/shallow’ to return a
dependency that depends on ‘glibc-utf8-locales’, but that can create
bootstrapping issues (also we don’t want unit tests to trigger a build
of ‘glibc-utf8-locales’ and everything before that).

Ludo’.
diff mbox

Patch

diff --git a/gnu/packages/music.scm b/gnu/packages/music.scm
index b0ed51298..296f7cfd3 100644
--- a/gnu/packages/music.scm
+++ b/gnu/packages/music.scm
@@ -231,6 +231,65 @@  score, keyboard, guitar, drum and controller views.")
 many input formats and provides a customisable Vi-style user interface.")
      (license license:gpl2+)))
 
+(define-public denemo
+  (package
+    (name "denemo")
+    (version "2.0.14")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "mirror://gnu/denemo/denemo-"
+                                  version ".tar.gz"))
+              (sha256
+               (base32
+                "1a7g38695g7jjypx25qp0dx0asrh72xwdj0mdhmb9pfyzlppq0wh"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (replace 'check
+           (lambda _
+             (zero? (system* "make" "-C" "tests" "check")))))))
+    (native-inputs
+     `(("autoconf" ,autoconf)
+       ("automake" ,automake)
+       ("glib:bin", glib "bin")   ; for gtester
+       ("pkg-config" ,pkg-config)))
+    (inputs
+     `(("alsa-lib" ,alsa-lib)
+       ("aubio" ,aubio)
+       ("evince" ,evince)
+       ("fftw" ,fftw)
+       ("fluidsynth" ,fluidsynth)
+       ("glib" ,glib)
+       ("gtk+" ,gtk+)
+       ("gtk-doc" ,gtk-doc)
+       ("gtksourceview" ,gtksourceview)
+       ("guile" ,guile-2.0)
+       ("intltool" ,intltool)
+       ("librsvg" ,librsvg)
+       ("libsndfile" ,libsndfile)
+       ("libtool" ,libtool)
+       ("libxml2" ,libxml2)
+       ("lilypond" ,lilypond)
+       ("portaudio" ,portaudio)
+       ("portmidi" ,portmidi)
+       ("rubberband" ,rubberband)))
+    (synopsis "Graphical music notation, front-end to GNU Lilypond")
+    (description
+     "GNU Denemo is a music notation editor that provides a convenient
+interface to the powerful music engraving program Lilypond.  Music can be
+typed in using the computer keyboard, played in using a MIDI keyboard, or
+even input via a microphone connected to the sound card.  The final product
+is publication-quality music notation that is continuously generated in the
+background while you work.")
+    (home-page "http://www.denemo.org")
+    (license (list license:cc-by-sa3.0
+                   license:lgpl2.1+
+                   license:gpl2
+                   license:gpl2+
+                   license:gpl3
+                   license:gpl3+))))
+
 (define-public hydrogen
   (package
     (name "hydrogen")