blob: a8eb2de8e1a7629abf12961d30d6c8d0258df83d (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
|
args :
let
lib = args.lib;
fetchurl = args.fetchurl;
FullDepEntry = args.FullDepEntry;
version = lib.getAttr ["version"] "9.4" args;
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 {
url = "http://downloads.sourceforge.net/snd/snd-${version}.tar.gz";
sha256 = "0zqgfnkvkqxby1k74mwba1r4pb520glcsz5jjmpzm9m41nqnghmm";
};
inherit buildInputs;
configureFlags = [];
/* doConfigure should be specified separately */
phaseNames = ["doConfigure" "preBuild" "makeDocsWork"
"doMakeInstall" "doForceShare"];
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 (''
cp config.log /tmp/snd-config.log
export NIX_LDFLAGS="$NIX_LDFLAGS -L${args.libX11}/lib -lX11"
'') ["minInit" "doUnpack" "makeDocsWork"];
name = "Snd-" + version;
meta = {
description = "Snd sound editor.";
homepage = http://ccrma.stanford.edu/software/snd;
inherit src;
};
}
|