about summary refs log tree commit diff
path: root/pkgs/applications/audio
diff options
context:
space:
mode:
authorOrivej Desh <orivej@gmx.fr>2020-03-19 19:53:57 +0000
committerOrivej Desh <orivej@gmx.fr>2020-03-19 19:54:22 +0000
commitc8edc08dc477ce2de29a95e77444bb84928a2e57 (patch)
tree458fb5217ef9ac33f963123970be1eb284cb756e /pkgs/applications/audio
parent63697ed0c2b3e1ec3dd7f46e4ce29ef9aaf4b9b9 (diff)
downloadnixlib-c8edc08dc477ce2de29a95e77444bb84928a2e57.tar
nixlib-c8edc08dc477ce2de29a95e77444bb84928a2e57.tar.gz
nixlib-c8edc08dc477ce2de29a95e77444bb84928a2e57.tar.bz2
nixlib-c8edc08dc477ce2de29a95e77444bb84928a2e57.tar.lz
nixlib-c8edc08dc477ce2de29a95e77444bb84928a2e57.tar.xz
nixlib-c8edc08dc477ce2de29a95e77444bb84928a2e57.tar.zst
nixlib-c8edc08dc477ce2de29a95e77444bb84928a2e57.zip
mup: init at 6.7
Diffstat (limited to 'pkgs/applications/audio')
-rw-r--r--pkgs/applications/audio/mup/default.nix41
-rw-r--r--pkgs/applications/audio/mup/ghostscript-permit-file-write.patch5
2 files changed, 46 insertions, 0 deletions
diff --git a/pkgs/applications/audio/mup/default.nix b/pkgs/applications/audio/mup/default.nix
new file mode 100644
index 000000000000..43098be12e3f
--- /dev/null
+++ b/pkgs/applications/audio/mup/default.nix
@@ -0,0 +1,41 @@
+{ stdenv, fetchurl, autoreconfHook, bison, flex, ghostscript, groff, netpbm
+, fltk, libXinerama, libXpm, libjpeg
+}:
+
+stdenv.mkDerivation rec {
+  pname = "mup";
+  version = "6.7";
+
+  src = fetchurl {
+    url = "http://www.arkkra.com/ftp/pub/unix/mup${builtins.replaceStrings ["."] [""] version}src.tar.gz";
+    sha256 = "1y1qknhib1isdjsbv833w3nxzyfljkfgp1gmjwly60l55q60frpk";
+  };
+
+  nativeBuildInputs = [ autoreconfHook bison flex ghostscript groff netpbm ];
+
+  buildInputs = [ fltk libXinerama libXpm libjpeg ];
+
+  patches = [ ./ghostscript-permit-file-write.patch ];
+
+  postPatch = ''
+    for f in Makefile.am doc/Makefile.am doc/htmldocs/Makefile.am src/mupmate/Preferences.C; do
+      substituteInPlace $f --replace doc/packages doc
+    done
+    substituteInPlace src/mupprnt/mupprnt --replace 'mup ' $out/bin/mup' '
+    substituteInPlace src/mupdisp/genfile.c --replace '"mup"' '"'$out/bin/mup'"'
+    substituteInPlace src/mupmate/Preferences.C \
+      --replace '"mup"' '"'$out/bin/mup'"' \
+      --replace '"gv"' '"xdg-open"' \
+      --replace /usr/share/doc $out/share/doc
+  '';
+
+  enableParallelBuilding = false; # Undeclared dependencies + https://stackoverflow.com/a/19822767/1687334 for prolog.ps.
+
+  meta = with stdenv.lib; {
+    homepage = http://www.arkkra.com/;
+    description = "Music typesetting program (ASCII to PostScript and MIDI)";
+    license = licenses.bsd3;
+    maintainers = with maintainers; [ orivej ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/pkgs/applications/audio/mup/ghostscript-permit-file-write.patch b/pkgs/applications/audio/mup/ghostscript-permit-file-write.patch
new file mode 100644
index 000000000000..5059e71001f0
--- /dev/null
+++ b/pkgs/applications/audio/mup/ghostscript-permit-file-write.patch
@@ -0,0 +1,5 @@
+--- a/src/mup/Makefile.am
++++ b/src/mup/Makefile.am
+@@ -39 +39 @@ fontdata.c:	prolog.ps ../../tools/mup/getfontinfo.ps ../../LICENSE
+-	$(GS) -sDEVICE=nullpage -sOutputFile=/dev/null -dQUIET - < ../../tools/mup/getfontinfo.ps | $(SED) -e "/Warning:/d" >> fontdata.c
++	$(GS) -sDEVICE=nullpage -sOutputFile=/dev/null -dQUIET --permit-file-write=charnames:fontinit - < ../../tools/mup/getfontinfo.ps | $(SED) -e "/Warning:/d" >> fontdata.c