2007-11-03 05:15:13 +01:00
|
|
|
args : with args;
|
2008-01-18 13:36:56 +01:00
|
|
|
let localDefs = builderDefs {
|
2007-11-03 05:15:13 +01:00
|
|
|
src =
|
|
|
|
fetchurl {
|
2008-03-07 11:48:54 +01:00
|
|
|
url = http://downloads.sourceforge.net/snd/snd-9.4.tar.gz;
|
2007-11-03 05:15:13 +01:00
|
|
|
sha256 = "0zqgfnkvkqxby1k74mwba1r4pb520glcsz5jjmpzm9m41nqnghmm";
|
|
|
|
};
|
|
|
|
|
2008-08-18 18:03:38 +02:00
|
|
|
buildInputs = [gtk glib pkgconfig libXpm gmp gettext libX11 fftw]
|
2007-11-03 05:15:13 +01:00
|
|
|
++ (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)
|
2008-08-18 18:03:38 +02:00
|
|
|
++ (lib.optional (args ? alsaLib) args.alsaLib)
|
|
|
|
++ (lib.optional (args ? jackaudio) args.jackaudio)
|
2007-11-03 05:15:13 +01:00
|
|
|
;
|
|
|
|
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" )
|
2008-08-18 18:03:38 +02:00
|
|
|
++ (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" ]
|
2007-11-03 05:15:13 +01:00
|
|
|
;
|
|
|
|
} null; /* null is a terminator for sumArgs */
|
2008-01-18 13:36:56 +01:00
|
|
|
in with localDefs;
|
2008-08-18 18:03:38 +02:00
|
|
|
let makeDocsWork = FullDepEntry ''
|
|
|
|
# hackish way to make html docs work
|
|
|
|
h="$out/share/snd/html"; ensureDir "$h"; cp *.html "$h"
|
|
|
|
patch -p1 < ${./doc.patch}
|
|
|
|
sed "s@HTML-DIR@$h@" -i index.scm snd-help.c
|
|
|
|
'' [defEnsureDir];
|
|
|
|
|
|
|
|
preBuild = FullDepEntry (''
|
2007-11-03 05:15:13 +01:00
|
|
|
cp config.log /tmp/snd-config.log
|
2008-08-18 18:03:38 +02:00
|
|
|
export NIX_LDFLAGS="$NIX_LDFLAGS -L${libX11}/lib -lX11"
|
|
|
|
|
|
|
|
'') [minInit doUnpack makeDocsWork];
|
2007-11-03 05:15:13 +01:00
|
|
|
in
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "Snd-9.4";
|
|
|
|
builder = writeScript (name + "-builder")
|
2008-08-18 18:03:38 +02:00
|
|
|
(textClosure localDefs [doConfigure preBuild makeDocsWork doMakeInstall doForceShare ]);
|
2007-11-03 05:15:13 +01:00
|
|
|
meta = {
|
2008-01-30 20:49:42 +01:00
|
|
|
description = "Snd sound editor.";
|
2008-08-18 18:03:38 +02:00
|
|
|
homepage = http://ccrma.stanford.edu/software/snd;
|
2008-03-02 19:49:31 +01:00
|
|
|
inherit src;
|
2007-11-03 05:15:13 +01:00
|
|
|
};
|
|
|
|
}
|