Created
February 19, 2016 17:09
-
-
Save magnetophon/b1d763ac7a4bf900c50a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ stdenv, fetchurl, python, makeWrapper }: | |
stdenv.mkDerivation rec { | |
version = "15.12"; | |
name = "mma-${version}"; | |
src = fetchurl { | |
url = "http://www.mellowood.ca/mma/mma-bin-15.12.tar.gz"; | |
sha256 = "0k37kcrfaxmwjb8xb1cbqinrkx3g50dbvwqbvwl3l762j4vr8jgx"; | |
}; | |
buildInputs = [ python makeWrapper ]; | |
installPhase= '' | |
mkdir -p $out/{bin,share/mma,share/man/man1,share/man/man8} | |
sed -i -e 's|MMAdir = d|MMAdir = "$out/MMA"; sys.path.insert(0, MMAdir)|' mma.py | |
cp mma.py $out/bin/mma | |
cp mma-gb $out/bin/mma-gb | |
cp mma-libdoc $out/bin/mma-libdoc | |
cp mma-renum $out/bin/mma-renum | |
cp mma-splitrec $out/bin/mma-splitrec | |
cp util/mma-mnx.py $out/bin/mma-mnx | |
cp util/mma-rm2std.py $out/bin/mma-rm2std | |
cp util/mmatabs.py $out/bin/mmatabs | |
cp util/mup2mma.py $out/bin/mup2mma | |
cp util/pg2mma.py $out/bin/pg2mma | |
cp util/synthsplit.py $out/bin/mma-synthsplit | |
cp -r {docs,egs,includes,lib,MMA,text} $out/share/mma | |
rmdir $out/share/mma/includes/aria | |
cp util/README.* $out/share/mma/docs | |
mv $out/share/mma/docs/man/mma-libdoc.8 $out/share/man/man8 | |
mv $out/share/mma/docs/man/mma-renum.1 $out/share/man/man1 | |
mv $out/share/mma/docs/man/mma.1 $out/share/man/man1 | |
mv $out/share/mma/docs/man/mma-gb.1 $out/share/man/man1 | |
rm -rf $out/share/mma/docs/man | |
${python.interpreter} mma.py -G | |
chmod a+w $out/share/mma/lib/stdlib/.mmaDB | |
for program in mma mma-* | |
do | |
wrapProgram $out/bin/$program \ | |
--set PYTHONPATH $out/share/mma:$program_PYTHONPATH | |
done | |
''; | |
# export PYTHONPATH="$out/share/mma/lib:$PYTHONPATH" | |
meta = { | |
description = "Musical MIDI Accompaniment is an accompaniment generator. It creates MIDI tracks for a soloist to perform over from a user supplied file containing chords and MMA directives."; | |
homepage = http://www.mellowood.ca/mma/index.html; | |
license = stdenv.lib.licenses.gpl2; | |
maintainers = [ stdenv.lib.maintainers.magnetophon ]; | |
platforms = stdenv.lib.platforms.all; | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment