nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 stdenv,
4 fetchurl,
5 autoreconfHook,
6 bison,
7 flex,
8 ghostscript,
9 groff,
10 netpbm,
11 fltk,
12 libXinerama,
13 libXpm,
14 libjpeg,
15}:
16
17stdenv.mkDerivation {
18 pname = "mup";
19 version = "7.2";
20
21 src = fetchurl {
22 urls = [
23 # Since the original site is geo-blocked in the EU, we may revert to the archived version;
24 # please update both URLs during future updates!
25 "http://www.arkkra.com/ftp/pub/unix/mup72src.tar.gz"
26 "https://web.archive.org/web/20250907143445/http://www.arkkra.com/ftp/pub/unix/mup72src.tar.gz"
27 ];
28 hash = "sha256-XbfIsSzE7cwdK0DlOyS8PEJbBGc7Doa1HGLsVfx2ZaY=";
29 };
30
31 nativeBuildInputs = [
32 autoreconfHook
33 bison
34 flex
35 ghostscript
36 groff
37 netpbm
38 ];
39
40 buildInputs = [
41 fltk
42 libXinerama
43 libXpm
44 libjpeg
45 ];
46
47 patches = [ ./ghostscript-permit-file-write.patch ];
48
49 postPatch = ''
50 for f in Makefile.am doc/Makefile.am doc/htmldocs/Makefile.am src/mupmate/Preferences.C; do
51 substituteInPlace $f --replace-fail doc/packages doc
52 done
53 substituteInPlace src/mupprnt/mupprnt \
54 --replace-fail 'mup ' $out/bin/mup' '
55 substituteInPlace src/mupdisp/genfile.c \
56 --replace-fail '"mup"' '"'$out/bin/mup'"'
57 substituteInPlace src/mupmate/Preferences.C \
58 --replace-fail '"mup"' '"'$out/bin/mup'"' \
59 --replace-fail '"gv"' '"xdg-open"' \
60 --replace-fail /usr/share/doc $out/share/doc
61 '';
62
63 enableParallelBuilding = false; # Undeclared dependencies + https://stackoverflow.com/a/19822767/1687334 for prolog.ps.
64
65 meta = {
66 homepage = "http://www.arkkra.com/";
67 description = "Music typesetting program (ASCII to PostScript and MIDI)";
68 license = lib.licenses.bsd3;
69 maintainers = [ ];
70 platforms = lib.platforms.linux;
71 };
72}