summaryrefslogtreecommitdiffstats
path: root/pkgs/applications/audio
diff options
context:
space:
mode:
authorMichael Raskin <7c6f434c@mail.ru>2008-08-19 05:54:09 +0000
committerMichael Raskin <7c6f434c@mail.ru>2008-08-19 05:54:09 +0000
commit87ff8d6347cd99618bc8f9ff58ddf357ce38c522 (patch)
tree304d18d1a67cf9e844bf9d772b2a5386d00aa5f0 /pkgs/applications/audio
parentb5b68ce414fabb63a782dd74e86e940350e9a662 (diff)
Changed builderDefs to use composedArgsAndFun, reduced number of nulls, made overrides in builderDefsPackage to work in an intuitive manner.
svn path=/nixpkgs/trunk/; revision=12655
Diffstat (limited to 'pkgs/applications/audio')
-rw-r--r--pkgs/applications/audio/audacity/default.nix4
-rw-r--r--pkgs/applications/audio/ladspa-plugins/default.nix4
-rw-r--r--pkgs/applications/audio/ladspa-plugins/ladspah.nix4
-rw-r--r--pkgs/applications/audio/snd/default.nix93
4 files changed, 57 insertions, 48 deletions
diff --git a/pkgs/applications/audio/audacity/default.nix b/pkgs/applications/audio/audacity/default.nix
index 950a8e93907c..644996065cd6 100644
--- a/pkgs/applications/audio/audacity/default.nix
+++ b/pkgs/applications/audio/audacity/default.nix
@@ -1,5 +1,5 @@
args: with args;
- let localDefs = builderDefs {
+ let localDefs = builderDefs.meta.function {
src =
fetchurl {
url = mirror://sourceforge/audacity/audacity-src-1.3.3.tar.gz;
@@ -8,7 +8,7 @@ args: with args;
buildInputs =[(wxGTK null) libogg libvorbis libsndfile libmad pkgconfig gtk
gettext glib];
- } null;
+ };
in with localDefs;
let
postInstall = FullDepEntry ("
diff --git a/pkgs/applications/audio/ladspa-plugins/default.nix b/pkgs/applications/audio/ladspa-plugins/default.nix
index 0c24a0fda454..230ee1d7de26 100644
--- a/pkgs/applications/audio/ladspa-plugins/default.nix
+++ b/pkgs/applications/audio/ladspa-plugins/default.nix
@@ -1,5 +1,5 @@
args: with args;
- let localDefs = builderDefs {
+ let localDefs = builderDefs.meta.function {
src =
fetchurl {
url = http://plugin.org.uk/releases/0.4.15/swh-plugins-0.4.15.tar.gz;
@@ -7,7 +7,7 @@ args: with args;
};
buildInputs = [fftw ladspaH pkgconfig];
configureFlags = [];
- } null;
+ };
in with localDefs;
let
postInstall = FullDepEntry ("
diff --git a/pkgs/applications/audio/ladspa-plugins/ladspah.nix b/pkgs/applications/audio/ladspa-plugins/ladspah.nix
index 82595b4163e9..60ee6fbf4571 100644
--- a/pkgs/applications/audio/ladspa-plugins/ladspah.nix
+++ b/pkgs/applications/audio/ladspa-plugins/ladspah.nix
@@ -6,10 +6,10 @@ let
sha256 = "1b908csn85ng9sz5s5d1mqk711cmawain2z8px2ajngihdrynb67";
};
in
- let localDefs = builderDefs {
+ let localDefs = builderDefs.meta.function {
buildInputs = [];
inherit src;
- } null;
+ };
in with localDefs;
let
copyFile = FullDepEntry ("
diff --git a/pkgs/applications/audio/snd/default.nix b/pkgs/applications/audio/snd/default.nix
index 0a8bb95173f3..a8eb2de8e1a7 100644
--- a/pkgs/applications/audio/snd/default.nix
+++ b/pkgs/applications/audio/snd/default.nix
@@ -1,51 +1,60 @@
-args : with args;
- let localDefs = builderDefs {
- src =
- fetchurl {
- url = http://downloads.sourceforge.net/snd/snd-9.4.tar.gz;
- sha256 = "0zqgfnkvkqxby1k74mwba1r4pb520glcsz5jjmpzm9m41nqnghmm";
- };
+args :
+let
+ lib = args.lib;
+ fetchurl = args.fetchurl;
+ FullDepEntry = args.FullDepEntry;
- buildInputs = [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" ]
- ;
- } null; /* null is a terminator for sumArgs */
- in with localDefs;
- let makeDocsWork = 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];
+ '' ["defEnsureDir"];
- preBuild = FullDepEntry (''
+ preBuild = FullDepEntry (''
cp config.log /tmp/snd-config.log
- export NIX_LDFLAGS="$NIX_LDFLAGS -L${libX11}/lib -lX11"
+ export NIX_LDFLAGS="$NIX_LDFLAGS -L${args.libX11}/lib -lX11"
- '') [minInit doUnpack makeDocsWork];
-in
-stdenv.mkDerivation rec {
- name = "Snd-9.4";
- builder = writeScript (name + "-builder")
- (textClosure localDefs [doConfigure preBuild makeDocsWork doMakeInstall doForceShare ]);
- meta = {
- description = "Snd sound editor.";
- homepage = http://ccrma.stanford.edu/software/snd;
- inherit src;
- };
+ '') ["minInit" "doUnpack" "makeDocsWork"];
+
+ name = "Snd-" + version;
+ meta = {
+ description = "Snd sound editor.";
+ homepage = http://ccrma.stanford.edu/software/snd;
+ inherit src;
+ };
}