11 stdenv.mkDerivation rec {
16 url = "https://www.mellowood.ca/mma/mma-bin-${version}.tar.gz";
17 sha256 = "sha256-5YzdaZ499AGiKAPUsgBCj3AQ9s0WlfgAbHhOQSOLLO8=";
20 nativeBuildInputs = [ makeWrapper ];
28 sed -i 's@/usr/bin/aplaymidi@/${alsa-utils}/bin/aplaymidi@g' mma-splitrec
29 sed -i 's@/usr/bin/aplaymidi@/${alsa-utils}/bin/aplaymidi@g' util/mma-splitrec.py
30 sed -i 's@/usr/bin/arecord@/${alsa-utils}/bin/arecord@g' mma-splitrec
31 sed -i 's@/usr/bin/arecord@/${alsa-utils}/bin/arecord@g' util/mma-splitrec.py
32 sed -i 's@/usr/bin/timidity@/${timidity}/bin/timidity@g' mma-splitrec
33 sed -i 's@/usr/bin/timidity@/${timidity}/bin/timidity@g' util/mma-splitrec.py
34 find . -type f | xargs sed -i 's@/usr/bin/env python@${python3.interpreter}@g'
35 find . -type f | xargs sed -i 's@/usr/bin/python3@${python3.interpreter}@g'
39 mkdir -p $out/{bin,share/mma,share/man/man1,share/man/man8}
42 cp mma.py $out/bin/mma
43 cp mma-gb $out/bin/mma-gb
44 cp mma-libdoc $out/bin/mma-libdoc
45 cp mma-renum $out/bin/mma-renum
46 cp mma-splitrec $out/bin/mma-splitrec
47 cp util/mma-mnx.py $out/bin/mma-mnx
48 cp util/mma-rm2std.py $out/bin/mma-rm2std
49 cp util/mmatabs.py $out/bin/mmatabs
50 cp util/mup2mma.py $out/bin/mup2mma
51 cp util/pg2mma.py $out/bin/pg2mma
52 cp util/synthsplit.py $out/bin/mma-synthsplit
53 cp -r {docs,egs,includes,lib,MMA,text,plugins} $out/share/mma
55 cp util/README.* $out/share/mma/docs
56 mv $out/share/mma/docs/man/mma-libdoc.8 $out/share/man/man8
57 mv $out/share/mma/docs/man/mma-renum.1 $out/share/man/man1
58 mv $out/share/mma/docs/man/mma.1 $out/share/man/man1
59 mv $out/share/mma/docs/man/mma-gb.1 $out/share/man/man1
60 rm -rf $out/share/mma/docs/man
61 find $out -type f | xargs sed -i "s@/usr/share/mma@$out/share/mma@g"
65 PYTHONPATH=$out/share/mma/:$PYTHONPATH
66 for f in $out/bin/*; do
68 --prefix PYTHONPATH : $PYTHONPATH
75 description = "Creates MIDI tracks for a soloist to perform over from a user supplied file containing chords";
76 homepage = "https://www.mellowood.ca/mma/index.html";
77 license = lib.licenses.gpl2;
78 maintainers = [ lib.maintainers.magnetophon ];
79 platforms = lib.platforms.linux;