2008-08-19 07:54:09 +02:00
|
|
|
args :
|
|
|
|
let
|
|
|
|
lib = args.lib;
|
|
|
|
fetchurl = args.fetchurl;
|
2009-05-20 01:25:58 +02:00
|
|
|
fullDepEntry = args.fullDepEntry;
|
2007-11-03 05:15:13 +01:00
|
|
|
|
2009-05-24 12:57:41 +02:00
|
|
|
version = lib.attrByPath ["version"] "9.4" args;
|
2008-08-19 07:54:09 +02:00
|
|
|
buildInputs = with args; [gtk glib pkgconfig
|
|
|
|
libXpm gmp gettext libX11 fftw]
|
|
|
|
++ (lib.optional (args ? ruby) args.ruby)
|
|
|
|
++ (lib.optional (args ? mesa) args.mesa)
|
|
|
|
++ (lib.optional (args ? guile) args.guile)
|
|
|
|
++ (lib.optional (args ? libtool) args.libtool)
|
|
|
|
++ (lib.optional (args ? sndlib) args.sndlib)
|
|
|
|
++ (lib.optional (args ? alsaLib) args.alsaLib)
|
|
|
|
++ (lib.optional (args ? jackaudio) args.jackaudio)
|
|
|
|
;
|
|
|
|
configureFlags = ["--with-gtk" "--with-xpm"]
|
|
|
|
++ (lib.optional (args ? ruby) "--with-ruby" )
|
|
|
|
++ (lib.optional (args ? mesa) "--with-gl" )
|
|
|
|
++ (lib.optional (args ? guile) "--with-guile")
|
|
|
|
++ (lib.optional (args ? sndlib) "--with-midi" )
|
|
|
|
++ (lib.optional (args ? alsaLib) "--with-alsa")
|
|
|
|
++ (lib.optional (args ? jackaudio) "--with-jack" )
|
|
|
|
++ [ "--with-fftw" "--htmldir=$out/share/snd/html" "--with-doc-dir=$out/share/snd/html" ]
|
|
|
|
;
|
|
|
|
in
|
|
|
|
rec {
|
|
|
|
src = fetchurl {
|
2013-07-14 03:17:07 +02:00
|
|
|
url = "mirror://sourceforge/snd/snd-${version}.tar.gz";
|
2008-08-19 07:54:09 +02:00
|
|
|
sha256 = "0zqgfnkvkqxby1k74mwba1r4pb520glcsz5jjmpzm9m41nqnghmm";
|
|
|
|
};
|
|
|
|
|
|
|
|
inherit buildInputs;
|
|
|
|
configureFlags = [];
|
|
|
|
|
|
|
|
/* doConfigure should be specified separately */
|
|
|
|
phaseNames = ["doConfigure" "preBuild" "makeDocsWork"
|
|
|
|
"doMakeInstall" "doForceShare"];
|
|
|
|
|
2009-05-20 01:25:58 +02:00
|
|
|
makeDocsWork = fullDepEntry ''
|
2008-08-18 18:03:38 +02:00
|
|
|
# hackish way to make html docs work
|
2012-01-18 21:16:00 +01:00
|
|
|
h="$out/share/snd/html"; mkdir -p "$h"; cp *.html "$h"
|
2008-08-18 18:03:38 +02:00
|
|
|
patch -p1 < ${./doc.patch}
|
|
|
|
sed "s@HTML-DIR@$h@" -i index.scm snd-help.c
|
2008-08-19 07:54:09 +02:00
|
|
|
'' ["defEnsureDir"];
|
2008-08-18 18:03:38 +02:00
|
|
|
|
2009-05-20 01:25:58 +02:00
|
|
|
preBuild = fullDepEntry (''
|
2008-08-19 07:54:09 +02:00
|
|
|
export NIX_LDFLAGS="$NIX_LDFLAGS -L${args.libX11}/lib -lX11"
|
|
|
|
'') ["minInit" "doUnpack" "makeDocsWork"];
|
|
|
|
|
2009-10-28 15:06:56 +01:00
|
|
|
name = "snd-" + version;
|
2008-08-19 07:54:09 +02:00
|
|
|
meta = {
|
2013-10-06 11:49:53 +02:00
|
|
|
description = "Sound editor";
|
2008-08-19 07:54:09 +02:00
|
|
|
homepage = http://ccrma.stanford.edu/software/snd;
|
|
|
|
inherit src;
|
|
|
|
};
|
2007-11-03 05:15:13 +01:00
|
|
|
}
|