From 2479dc0c636995788301892b92c3c061477b4738 Mon Sep 17 00:00:00 2001 From: Bart Brouns Date: Mon, 16 Mar 2015 15:39:52 +0100 Subject: [PATCH 1/2] add puredata-with-plugins: a wrapper for puredata, plus packages for the following plugins: cyclone helmholtz maxlib mrpeach puremapping timbreid zexy --- .../audio/pd-plugins/cyclone/default.nix | 41 +++++++++++++ .../audio/pd-plugins/helmholtz/default.nix | 42 +++++++++++++ .../audio/pd-plugins/maxlib/default.nix | 33 ++++++++++ .../audio/pd-plugins/mrpeach/default.nix | 60 +++++++++++++++++++ .../audio/pd-plugins/puremapping/default.nix | 30 ++++++++++ .../audio/pd-plugins/timbreid/default.nix | 35 +++++++++++ .../audio/pd-plugins/zexy/default.nix | 36 +++++++++++ pkgs/applications/audio/puredata/wrapper.nix | 23 +++++++ pkgs/top-level/all-packages.nix | 15 +++++ 9 files changed, 315 insertions(+) create mode 100644 pkgs/applications/audio/pd-plugins/cyclone/default.nix create mode 100644 pkgs/applications/audio/pd-plugins/helmholtz/default.nix create mode 100644 pkgs/applications/audio/pd-plugins/maxlib/default.nix create mode 100644 pkgs/applications/audio/pd-plugins/mrpeach/default.nix create mode 100644 pkgs/applications/audio/pd-plugins/puremapping/default.nix create mode 100644 pkgs/applications/audio/pd-plugins/timbreid/default.nix create mode 100644 pkgs/applications/audio/pd-plugins/zexy/default.nix create mode 100644 pkgs/applications/audio/puredata/wrapper.nix diff --git a/pkgs/applications/audio/pd-plugins/cyclone/default.nix b/pkgs/applications/audio/pd-plugins/cyclone/default.nix new file mode 100644 index 000000000000..30bdd534d402 --- /dev/null +++ b/pkgs/applications/audio/pd-plugins/cyclone/default.nix @@ -0,0 +1,41 @@ +{ stdenv, fetchurl, puredata }: + +stdenv.mkDerivation rec { + name = "cyclone-${version}"; + version = "0.1-alpha55"; + + src = fetchurl { + url = "http://downloads.sourceforge.net/project/pure-data/libraries/cyclone/${name}.tar.gz"; + sha256 = "1yys9xrlz09xgnqk2gqdl8vw6xj6l9d7km2lkihidgjql0jx5b5i"; + }; + + buildInputs = [ puredata ]; + + /*unpackPhase = ''*/ + /*unzip $src*/ + /*'';*/ + + patchPhase = '' + for file in `grep -r -l g_canvas.h` + do + sed -i 's|#include "g_canvas.h"|#include "${puredata}/include/pd/g_canvas.h"|g' $file + done + for file in `grep -r -l m_imp.h` + do + sed -i 's|#include "m_imp.h"|#include "${puredata}/include/pd/m_imp.h"|g' $file + done + ''; + + installPhase = '' + mkdir -p $out/cyclone + cp -r bin/* $out/cyclone + ''; + + meta = { + description = "A library of PureData classes, bringing some level of compatibility between Max/MSP and Pd environments."; + homepage = http://puredata.info/downloads/cyclone; + license = stdenv.lib.licenses.tcltk; + maintainers = [ stdenv.lib.maintainers.magnetophon ]; + platforms = stdenv.lib.platforms.linux; + }; +} diff --git a/pkgs/applications/audio/pd-plugins/helmholtz/default.nix b/pkgs/applications/audio/pd-plugins/helmholtz/default.nix new file mode 100644 index 000000000000..edc8aeb6eb0d --- /dev/null +++ b/pkgs/applications/audio/pd-plugins/helmholtz/default.nix @@ -0,0 +1,42 @@ +{ stdenv, fetchurl, unzip, puredata }: + +stdenv.mkDerivation rec { + name = "helmholtz"; + + src = fetchurl { + url = "http://www.katjaas.nl/helmholtz/helmholtz~.zip"; + name = "helmholtz.zip"; + sha256 = "0h1fj7lmvq9j6rmw33rb8k0byxb898bi2xhcwkqalb84avhywgvs"; + }; + + buildInputs = [ unzip puredata ]; + + unpackPhase = '' + unzip $src + mv helmholtz~/src/helmholtz\~.cpp . + mv helmholtz~/src/Helmholtz.cpp . + mv helmholtz~/src/include/ . + mv helmholtz~/src/Makefile . + rm -rf helmholtz~/src/ + rm helmholtz~/helmholtz~.pd_darwin + rm helmholtz~/helmholtz~.dll + rm -rf __MACOSX + ''; + + patchPhase = '' + sed -i "s@current: pd_darwin@current: pd_linux@g" Makefile + sed -i "s@-Wl@@g" Makefile + ''; + + installPhase = '' + cp -r helmholtz~/ $out/ + ''; + + meta = { + description = "time domain pitch tracker for Pure Data"; + homepage = http://www.katjaas.nl/helmholtz/helmholtz.html; + license = stdenv.lib.licenses.bsd3; + maintainers = [ stdenv.lib.maintainers.magnetophon ]; + platforms = stdenv.lib.platforms.linux; + }; +} diff --git a/pkgs/applications/audio/pd-plugins/maxlib/default.nix b/pkgs/applications/audio/pd-plugins/maxlib/default.nix new file mode 100644 index 000000000000..0d8b2dd8e2e8 --- /dev/null +++ b/pkgs/applications/audio/pd-plugins/maxlib/default.nix @@ -0,0 +1,33 @@ +{ stdenv, fetchurl, puredata }: + +stdenv.mkDerivation rec { + name = "maxlib-${version}"; + version = "1.5.5"; + + src = fetchurl { + url = "http://downloads.sourceforge.net/project/pure-data/libraries/maxlib/${name}.tar.gz"; + sha256 = "0vxl9s815dnay5r0067rxsfh8f6jbk61f0nxrydzjydfycza7p1w"; + }; + + buildInputs = [ puredata ]; + + patchPhase = '' + for i in ${puredata}/include/pd/*; do + ln -s $i . + done + sed -i "s@/usr@$out@g" Makefile + ''; + + postInstall = '' + mv $out/local/lib/pd-externals/maxlib/ $out + rm -rf $out/local/ + ''; + + meta = { + description = "A library of non-tilde externals for puredata, by Miller Puckette."; + homepage = http://puredata.info/downloads/maxlib; + license = stdenv.lib.licenses.gpl2; + maintainers = [ stdenv.lib.maintainers.magnetophon ]; + platforms = stdenv.lib.platforms.linux; + }; +} diff --git a/pkgs/applications/audio/pd-plugins/mrpeach/default.nix b/pkgs/applications/audio/pd-plugins/mrpeach/default.nix new file mode 100644 index 000000000000..1d553231ded1 --- /dev/null +++ b/pkgs/applications/audio/pd-plugins/mrpeach/default.nix @@ -0,0 +1,60 @@ +{ stdenv, fetchurl, puredata }: + +stdenv.mkDerivation rec { + name = "mrpeach-${version}"; + version = "1.1"; + + # this was to only usable url I could find: + # - The main url changes hash: http://pure-data.cvs.sourceforge.net/viewvc/pure-data/externals/mrpeach/?view=tar + # - There are lot's of places where this SW is available as part of a big pkg: pd-extended, pd-l2ork + # - It's just 211K + + src = fetchurl { + url = "http://slackonly.com/pub/korgie/sources/pd_mrpeach-2011.10.21.tar.gz"; + sha256 = "12jqba3jsdrk20ib9wc2wiivki88ypcd4mkzgsri9siywbbz9w8x"; + }; + + buildInputs = [puredata ]; + + patchPhase = '' + for D in net osc + do + sed -i "s@prefix = /usr/local@prefix = $out@g" $D/Makefile + for i in ${puredata}/include/pd/*; do + ln -s $i $D/ + done + done + ''; + + buildPhase = '' + for D in net osc + do + cd $D + make + cd .. + done + ''; + + installPhase = '' + for D in net osc + do + cd $D + make install + cd .. + done + ''; + + fixupPhase = '' + mv $out/lib/pd-externals/net $out + mv $out/lib/pd-externals/osc $out + rm -rf $out/lib + ''; + + meta = { + description = "A collection of Pd objectclasses for OSC-messages."; + homepage = http://puredata.info/downloads/osc; + license = stdenv.lib.licenses.gpl2; + maintainers = [ stdenv.lib.maintainers.magnetophon ]; + platforms = stdenv.lib.platforms.linux; + }; +} diff --git a/pkgs/applications/audio/pd-plugins/puremapping/default.nix b/pkgs/applications/audio/pd-plugins/puremapping/default.nix new file mode 100644 index 000000000000..f7f1969fe279 --- /dev/null +++ b/pkgs/applications/audio/pd-plugins/puremapping/default.nix @@ -0,0 +1,30 @@ +{ stdenv, fetchurl, unzip, puredata }: + +stdenv.mkDerivation rec { + name = "puremapping"; + + src = fetchurl { + url = "http://www.chnry.net/ch/IMG/zip/puremapping-libdir-generic.zip"; + name = "puremapping"; + sha256 = "1ygzxsfj3rnzjkpmgi4wch810q8s5vm1gdam6a938hbbvamafgvc"; + }; + + buildInputs = [ unzip puredata ]; + + unpackPhase = '' + unzip $src + ''; + + installPhase = '' + mkdir -p $out/puremapping + mv puremapping/ $out + ''; + + meta = { + description = "Set of externals to facilitate the use of sensors within Pure Data and to create complex relations between input and output of a dynamic system."; + homepage = http://www.chnry.net/ch/?090-Pure-Mapping&lang=en; + license = stdenv.lib.licenses.gpl1; + maintainers = [ stdenv.lib.maintainers.magnetophon ]; + platforms = stdenv.lib.platforms.linux; + }; +} diff --git a/pkgs/applications/audio/pd-plugins/timbreid/default.nix b/pkgs/applications/audio/pd-plugins/timbreid/default.nix new file mode 100644 index 000000000000..f8a25256bb07 --- /dev/null +++ b/pkgs/applications/audio/pd-plugins/timbreid/default.nix @@ -0,0 +1,35 @@ +{ stdenv, fetchurl, unzip, puredata }: + +stdenv.mkDerivation rec { + version = "0.6.0"; + name = "timbreid-${version}"; + + src = fetchurl { + url = "http://williambrent.conflations.com/pd/timbreID-${version}-src.zip"; + sha256 = "02rnkb0vpjxrr60c3hryv7zhyjpci2mi9dk27kjxpj5zp26gjk0p"; + }; + + buildInputs = [ unzip puredata ]; + + unpackPhase = '' + unzip $src + mv timbreID-0.6.0-src/tID/* . + rm -rf timbreID-0.6.0-src/tID/ + rm -rf timbreID-0.6.0-src/INSTALL.txt + ''; + + installPhase = '' + mkdir -p $out/ + cp -r *.pd $out/ + cp -r *.pd_linux $out/ + cp -r *.wav $out/ + ''; + + meta = { + description = "A collection of audio feature analysis externals for puredata"; + homepage = http://williambrent.conflations.com/pages/research.html; + license = stdenv.lib.licenses.gpl3; + maintainers = [ stdenv.lib.maintainers.magnetophon ]; + platforms = stdenv.lib.platforms.linux; + }; +} diff --git a/pkgs/applications/audio/pd-plugins/zexy/default.nix b/pkgs/applications/audio/pd-plugins/zexy/default.nix new file mode 100644 index 000000000000..89a0f8191df4 --- /dev/null +++ b/pkgs/applications/audio/pd-plugins/zexy/default.nix @@ -0,0 +1,36 @@ +{ stdenv, fetchurl, autoconf, automake, puredata }: + +stdenv.mkDerivation rec { + name = "zexy-${version}"; + version = "2.2.4"; + + src = fetchurl { + url = "http://puredata.info/downloads/zexy/releases/${version}/${name}.tar.gz"; + sha256 = "1xpgl82c2lc6zfswjsa7z10yhv5jb7a4znzh3nc7ffrzm1z8vylp"; + }; + + buildInputs = [ autoconf automake puredata ]; + + patchPhase = '' + cd src/ + for i in ${puredata}/include/pd/*; do + ln -s $i . + done + patchShebangs + ./bootstrap.sh + ./configure --enable-lpt=no --prefix=$out + ''; + + postInstall = '' + mv $out/lib/pd/extra/zexy $out + rm -rf $out/lib + ''; + + meta = { + description = "the swiss army knife for puredata"; + homepage = http://puredata.info/downloads/zexy; + license = stdenv.lib.licenses.gpl2; + maintainers = [ stdenv.lib.maintainers.magnetophon ]; + platforms = stdenv.lib.platforms.linux; + }; +} diff --git a/pkgs/applications/audio/puredata/wrapper.nix b/pkgs/applications/audio/puredata/wrapper.nix new file mode 100644 index 000000000000..0a30037b2268 --- /dev/null +++ b/pkgs/applications/audio/puredata/wrapper.nix @@ -0,0 +1,23 @@ +{ stdenv, buildEnv, puredata, makeWrapper, plugins }: + +let +puredataFlags = map (x: "-path ${x}/") plugins; +drv = buildEnv { + name = "puredata-with-plugins-" + (builtins.parseDrvName puredata.name).version; + + paths = [ puredata ] ++ plugins; + + postBuild = '' + # TODO: This could be avoided if buildEnv could be forced to create all directories + if [ -L $out/bin ]; then + rm $out/bin + mkdir $out/bin + for i in ${puredata}/bin/*; do + ln -s $i $out/bin + done + fi + wrapProgram $out/bin/pd \ + --add-flags "${toString puredataFlags}" + ''; + }; +in stdenv.lib.overrideDerivation drv (x : { buildInputs = x.buildInputs ++ [ makeWrapper ]; }) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 1dcabd9bb21f..9e1882ab5842 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -9993,6 +9993,8 @@ let cvs2svn = callPackage ../applications/version-management/cvs2svn { }; + cyclone = callPackage ../applications/audio/pd-plugins/cyclone { }; + d4x = callPackage ../applications/misc/d4x { }; darcs = haskell-ng.lib.overrideCabal haskellngPackages.darcs (drv: { @@ -10659,6 +10661,8 @@ let hello = callPackage ../applications/misc/hello/ex-2 { }; + helmholtz = callPackage ../applications/audio/pd-plugins/helmholtz { }; + herbstluftwm = callPackage ../applications/window-managers/herbstluftwm { }; hexchat = callPackage ../applications/networking/irc/hexchat { }; @@ -11082,6 +11086,8 @@ let vaapiSupport = config.mpv.vaapiSupport or false; }; + mrpeach = callPackage ../applications/audio/pd-plugins/mrpeach { }; + mrxvt = callPackage ../applications/misc/mrxvt { }; mudlet = callPackage ../games/mudlet { @@ -11152,6 +11158,8 @@ let lua = lua5; }; + maxlib = callPackage ../applications/audio/pd-plugins/maxlib { }; + mupdf = callPackage ../applications/misc/mupdf { openjpeg = openjpeg_2_0_1; }; @@ -11337,6 +11345,9 @@ let pulseview = callPackage ../applications/science/electronics/pulseview { }; puredata = callPackage ../applications/audio/puredata { }; + puredata-with-plugins = plugins: callPackage ../applications/audio/puredata/wrapper.nix { inherit plugins; }; + + puremapping = callPackage ../applications/audio/pd-plugins/puremapping { }; pythonmagick = callPackage ../applications/graphics/PythonMagick { }; @@ -11741,6 +11752,8 @@ let gtk = gtk3; }; + timbreid = callPackage ../applications/audio/pd-plugins/timbreid { }; + timidity = callPackage ../tools/misc/timidity { }; tint2 = callPackage ../applications/misc/tint2 { }; @@ -12328,6 +12341,8 @@ let zeroc_ice = callPackage ../development/libraries/zeroc-ice { }; + zexy = callPackage ../applications/audio/pd-plugins/zexy { }; + girara = callPackage ../applications/misc/girara { gtk = gtk3; stdenv = overrideCC stdenv gcc49; From 46658b8a19e30b2c0bce5571a541b886bb44d05f Mon Sep 17 00:00:00 2001 From: Bart Brouns Date: Mon, 16 Mar 2015 19:34:36 +0100 Subject: [PATCH 2/2] Punctuation and capitalisation. --- pkgs/applications/audio/pd-plugins/cyclone/default.nix | 6 +----- pkgs/applications/audio/pd-plugins/helmholtz/default.nix | 2 +- pkgs/applications/audio/pd-plugins/maxlib/default.nix | 2 +- pkgs/applications/audio/pd-plugins/mrpeach/default.nix | 2 +- pkgs/applications/audio/pd-plugins/puremapping/default.nix | 2 +- pkgs/applications/audio/pd-plugins/zexy/default.nix | 2 +- 6 files changed, 6 insertions(+), 10 deletions(-) diff --git a/pkgs/applications/audio/pd-plugins/cyclone/default.nix b/pkgs/applications/audio/pd-plugins/cyclone/default.nix index 30bdd534d402..b90c6a0ea369 100644 --- a/pkgs/applications/audio/pd-plugins/cyclone/default.nix +++ b/pkgs/applications/audio/pd-plugins/cyclone/default.nix @@ -11,10 +11,6 @@ stdenv.mkDerivation rec { buildInputs = [ puredata ]; - /*unpackPhase = ''*/ - /*unzip $src*/ - /*'';*/ - patchPhase = '' for file in `grep -r -l g_canvas.h` do @@ -32,7 +28,7 @@ stdenv.mkDerivation rec { ''; meta = { - description = "A library of PureData classes, bringing some level of compatibility between Max/MSP and Pd environments."; + description = "A library of PureData classes, bringing some level of compatibility between Max/MSP and Pd environments"; homepage = http://puredata.info/downloads/cyclone; license = stdenv.lib.licenses.tcltk; maintainers = [ stdenv.lib.maintainers.magnetophon ]; diff --git a/pkgs/applications/audio/pd-plugins/helmholtz/default.nix b/pkgs/applications/audio/pd-plugins/helmholtz/default.nix index edc8aeb6eb0d..9046ec0a87fc 100644 --- a/pkgs/applications/audio/pd-plugins/helmholtz/default.nix +++ b/pkgs/applications/audio/pd-plugins/helmholtz/default.nix @@ -33,7 +33,7 @@ stdenv.mkDerivation rec { ''; meta = { - description = "time domain pitch tracker for Pure Data"; + description = "Time domain pitch tracker for Pure Data"; homepage = http://www.katjaas.nl/helmholtz/helmholtz.html; license = stdenv.lib.licenses.bsd3; maintainers = [ stdenv.lib.maintainers.magnetophon ]; diff --git a/pkgs/applications/audio/pd-plugins/maxlib/default.nix b/pkgs/applications/audio/pd-plugins/maxlib/default.nix index 0d8b2dd8e2e8..dc4d03759616 100644 --- a/pkgs/applications/audio/pd-plugins/maxlib/default.nix +++ b/pkgs/applications/audio/pd-plugins/maxlib/default.nix @@ -24,7 +24,7 @@ stdenv.mkDerivation rec { ''; meta = { - description = "A library of non-tilde externals for puredata, by Miller Puckette."; + description = "A library of non-tilde externals for puredata, by Miller Puckette"; homepage = http://puredata.info/downloads/maxlib; license = stdenv.lib.licenses.gpl2; maintainers = [ stdenv.lib.maintainers.magnetophon ]; diff --git a/pkgs/applications/audio/pd-plugins/mrpeach/default.nix b/pkgs/applications/audio/pd-plugins/mrpeach/default.nix index 1d553231ded1..5f76b208e143 100644 --- a/pkgs/applications/audio/pd-plugins/mrpeach/default.nix +++ b/pkgs/applications/audio/pd-plugins/mrpeach/default.nix @@ -51,7 +51,7 @@ stdenv.mkDerivation rec { ''; meta = { - description = "A collection of Pd objectclasses for OSC-messages."; + description = "A collection of Pd objectclasses for OSC-messages"; homepage = http://puredata.info/downloads/osc; license = stdenv.lib.licenses.gpl2; maintainers = [ stdenv.lib.maintainers.magnetophon ]; diff --git a/pkgs/applications/audio/pd-plugins/puremapping/default.nix b/pkgs/applications/audio/pd-plugins/puremapping/default.nix index f7f1969fe279..fc7fc5ee3d0c 100644 --- a/pkgs/applications/audio/pd-plugins/puremapping/default.nix +++ b/pkgs/applications/audio/pd-plugins/puremapping/default.nix @@ -21,7 +21,7 @@ stdenv.mkDerivation rec { ''; meta = { - description = "Set of externals to facilitate the use of sensors within Pure Data and to create complex relations between input and output of a dynamic system."; + description = "Set of externals to facilitate the use of sensors within Pure Data and to create complex relations between input and output of a dynamic system"; homepage = http://www.chnry.net/ch/?090-Pure-Mapping&lang=en; license = stdenv.lib.licenses.gpl1; maintainers = [ stdenv.lib.maintainers.magnetophon ]; diff --git a/pkgs/applications/audio/pd-plugins/zexy/default.nix b/pkgs/applications/audio/pd-plugins/zexy/default.nix index 89a0f8191df4..68996e9e6e4c 100644 --- a/pkgs/applications/audio/pd-plugins/zexy/default.nix +++ b/pkgs/applications/audio/pd-plugins/zexy/default.nix @@ -27,7 +27,7 @@ stdenv.mkDerivation rec { ''; meta = { - description = "the swiss army knife for puredata"; + description = "The swiss army knife for puredata"; homepage = http://puredata.info/downloads/zexy; license = stdenv.lib.licenses.gpl2; maintainers = [ stdenv.lib.maintainers.magnetophon ];