···1+{ stdenv, fetchurl, puredata }:
2+3+stdenv.mkDerivation rec {
4+ name = "mrpeach-${version}";
5+ version = "1.1";
6+7+ # this was to only usable url I could find:
8+ # - The main url changes hash: http://pure-data.cvs.sourceforge.net/viewvc/pure-data/externals/mrpeach/?view=tar
9+ # - There are lot's of places where this SW is available as part of a big pkg: pd-extended, pd-l2ork
10+ # - It's just 211K
11+12+ src = fetchurl {
13+ url = "http://slackonly.com/pub/korgie/sources/pd_mrpeach-2011.10.21.tar.gz";
14+ sha256 = "12jqba3jsdrk20ib9wc2wiivki88ypcd4mkzgsri9siywbbz9w8x";
15+ };
16+17+ buildInputs = [puredata ];
18+19+ patchPhase = ''
20+ for D in net osc
21+ do
22+ sed -i "s@prefix = /usr/local@prefix = $out@g" $D/Makefile
23+ for i in ${puredata}/include/pd/*; do
24+ ln -s $i $D/
25+ done
26+ done
27+ '';
28+29+ buildPhase = ''
30+ for D in net osc
31+ do
32+ cd $D
33+ make
34+ cd ..
35+ done
36+ '';
37+38+ installPhase = ''
39+ for D in net osc
40+ do
41+ cd $D
42+ make install
43+ cd ..
44+ done
45+ '';
46+47+ fixupPhase = ''
48+ mv $out/lib/pd-externals/net $out
49+ mv $out/lib/pd-externals/osc $out
50+ rm -rf $out/lib
51+ '';
52+53+ meta = {
54+ description = "A collection of Pd objectclasses for OSC-messages";
55+ homepage = http://puredata.info/downloads/osc;
56+ license = stdenv.lib.licenses.gpl2;
57+ maintainers = [ stdenv.lib.maintainers.magnetophon ];
58+ platforms = stdenv.lib.platforms.linux;
59+ };
60+}