sox, ffmpeg_svn expressions added
ghcPkgUtil defines a function to create setup-hook - creating a packagedatabase (nix-support/package.conf) - adding it to GHC_PACKAGE_PATH see comments for details svn path=/nixpkgs/trunk/; revision=9500
This commit is contained in:
parent
614a3b47c6
commit
e87c6a6793
58
pkgs/applications/misc/audio/sox/default.nix
Normal file
58
pkgs/applications/misc/audio/sox/default.nix
Normal file
@ -0,0 +1,58 @@
|
|||||||
|
args:
|
||||||
|
( args.mkDerivationByConfigruation {
|
||||||
|
flagConfig = {
|
||||||
|
mandatory = { implies = [ "no_oss" "no_sun_audio" ]; };
|
||||||
|
# are these options of interest? We'll see
|
||||||
|
#--disable-fftw disable usage of FFTW
|
||||||
|
#--enable-debug enable debugging
|
||||||
|
#--disable-cpu-clip disable tricky cpu specific clipper
|
||||||
|
alsa = { cfgOption = "--enable-alsa"; buildInputs = "alsa"; };
|
||||||
|
no_alsa = { cfgOption = "--disable-alsa"; };
|
||||||
|
libao = { cfgOption = "--enable-libao"; buildInputs = "libao"; };
|
||||||
|
no_libao = { cfgOption = "--disable-libao"; };
|
||||||
|
#oss = { cfgOption = "--enable-oss"; buildInputs = "oss"; };
|
||||||
|
no_oss = { cfgOption = "--disable-oss"; };
|
||||||
|
#sun_audio = { cfgOption = "--enable-sun-audio"; buildInputs = "sun_audio"; };
|
||||||
|
no_sun_audio = { cfgOption = "--disable-sun_audio"; };
|
||||||
|
|
||||||
|
# These options should be autodetected by the configure script
|
||||||
|
/*
|
||||||
|
--without-sndfile Don't try to use libsndfile
|
||||||
|
--without-ogg Don't try to use Ogg Vorbis
|
||||||
|
--without-flac Don't try to use FLAC
|
||||||
|
--without-ffmpeg Don't try to use ffmpeg
|
||||||
|
--without-mad Don't try to use MAD (MP3 Audio Decoder)
|
||||||
|
--without-lame Don't try to use LAME (LAME Ain't an MP3 Encoder)
|
||||||
|
--without-amr-wb Don't try to use amr-wb
|
||||||
|
--without-amr-nb Don't try to use amr-nb
|
||||||
|
--without-samplerate Don't try to use libsamplerate (aka Secret Rabbit
|
||||||
|
Code)
|
||||||
|
--without-ladspa Don't try to use LADSPA
|
||||||
|
--with-ladspa-path Default search path for LADSPA plugins
|
||||||
|
*/
|
||||||
|
};
|
||||||
|
|
||||||
|
optionals = [ "libsndfile" "libogg" "flac" "ffmpeg" "libmad" "lame"
|
||||||
|
/* "amr-wb" "amr-nb" */
|
||||||
|
"libsamplerate" /* "ladspa" */ ];
|
||||||
|
|
||||||
|
|
||||||
|
extraAttrs = co : {
|
||||||
|
name = "sox-14.0.0";
|
||||||
|
|
||||||
|
src = args.fetchurl {
|
||||||
|
url = mirror://sourceforge/sox/sox-14.0.0.tar.gz;
|
||||||
|
sha256 = "1l7v04nlvb96y0w9crvm6nq8g50yxp3bkv6nb1c205s982inlalc";
|
||||||
|
};
|
||||||
|
|
||||||
|
meta = {
|
||||||
|
description = "Sample Rate Converter for audio";
|
||||||
|
homepage = http://www.mega-nerd.com/SRC/index.html;
|
||||||
|
# you can choose one of the following licenses:
|
||||||
|
license = [ "GPL"
|
||||||
|
{ url=http://www.mega-nerd.com/SRC/libsamplerate-cul.pdf;
|
||||||
|
name="libsamplerate Commercial Use License";
|
||||||
|
} ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
} ) args
|
11
pkgs/development/libraries/ffmpeg_svn_snapshot/default.nix
Normal file
11
pkgs/development/libraries/ffmpeg_svn_snapshot/default.nix
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
{stdenv, fetchurl}:
|
||||||
|
|
||||||
|
stdenv.mkDerivation {
|
||||||
|
name = "ffmpeg-svn";
|
||||||
|
src = fetchurl {
|
||||||
|
url = http://ffmpeg.mplayerhq.hu/ffmpeg-export-snapshot.tar.bz2;
|
||||||
|
sha256 = "040a35f0c004323af14329c09ad3cff8d040e2cf9797d97cde3d9d83d02b4d87";
|
||||||
|
};
|
||||||
|
# !!! Hm, what are the legal consequences of --enable-gpl?
|
||||||
|
configureFlags = "--enable-shared --enable-pp --enable-gpl --disable-ffserver --disable-ffplay";
|
||||||
|
}
|
33
pkgs/development/libraries/haskell/generic/ghcPkgUtil.sh
Normal file
33
pkgs/development/libraries/haskell/generic/ghcPkgUtil.sh
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
# mantainer: Marc Weber (marco-oweber@gmx.de)
|
||||||
|
#
|
||||||
|
# example usage: add ghcPkgUtil to buildInputs then somewhere in buildPhase:
|
||||||
|
#
|
||||||
|
# createEmptyPackageDatabaseAndSetupHook
|
||||||
|
# configure --with-package-db=$PACKAGE_DB
|
||||||
|
# ... compile ghc library ...
|
||||||
|
# add your library to propagatedBuildInputs instead of buildInputs
|
||||||
|
# in all depending libraries
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# creates a setup hook
|
||||||
|
# adding the package database
|
||||||
|
# nix-support/package.conf to GHC_PACKAGE_PATH
|
||||||
|
# if not already contained
|
||||||
|
setupHookRegisteringPackageDatabase(){
|
||||||
|
ensureDir $out/nix-support;
|
||||||
|
local pkgdb=$out/nix-support/package.conf
|
||||||
|
cat >> $out/nix-support/setup-hook << EOF
|
||||||
|
|
||||||
|
echo \$GHC_PACKAGE_PATH | grep -l $pkgdb &> /dev/null || \
|
||||||
|
export GHC_PACKAGE_PATH=\$GHC_PACKAGE_PATH\${GHC_PACKAGE_PATH:+$PATH_DELIMITER}$pkgdb;
|
||||||
|
EOF
|
||||||
|
}
|
||||||
|
|
||||||
|
# create an empty package database in which the new library can be registered.
|
||||||
|
createEmptyPackageDatabaseAndSetupHook(){
|
||||||
|
ensureDir $out/nix-support;
|
||||||
|
PACKAGE_DB=$out/nix-support/package.conf;
|
||||||
|
echo '[]' > $PACKAGE_DB";
|
||||||
|
setupHookRegisteringPackageDatabase
|
||||||
|
}
|
35
pkgs/development/libraries/libsamplerate/default.nix
Normal file
35
pkgs/development/libraries/libsamplerate/default.nix
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
args:
|
||||||
|
( args.mkDerivationByConfigruation {
|
||||||
|
flagConfig = {
|
||||||
|
mandatory = { buildInputs = ["pkgconfig"];};
|
||||||
|
# are these options of interest? We'll see
|
||||||
|
#--disable-fftw disable usage of FFTW
|
||||||
|
#--enable-debug enable debugging
|
||||||
|
#--disable-cpu-clip disable tricky cpu specific clipper
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
extraAttrs = co : {
|
||||||
|
name = "libsamplerate-0.1.2";
|
||||||
|
|
||||||
|
src = args.fetchurl {
|
||||||
|
url = http://www.mega-nerd.com/SRC/libsamplerate-0.1.2.tar.gz;
|
||||||
|
sha256 = "1m1iwzpcny42kcqv5as2nyb0ggrb56wzckpximqpp2y74dipdf4q";
|
||||||
|
};
|
||||||
|
|
||||||
|
configurePhase = "
|
||||||
|
export LIBSAMPLERATE_CFLAGS=\"-I \$libsamplerate/include\"
|
||||||
|
export LIBSAMPLERATE_LIBS=\"-L \$libsamplerate/libs\"
|
||||||
|
./configure --prefix=\$out"+co.configureFlags;
|
||||||
|
|
||||||
|
meta = {
|
||||||
|
description = "Sample Rate Converter for audio";
|
||||||
|
homepage = http://www.mega-nerd.com/SRC/index.html;
|
||||||
|
# you can choose one of the following licenses:
|
||||||
|
license = [ "GPL"
|
||||||
|
{ url=http://www.mega-nerd.com/SRC/libsamplerate-cul.pdf;
|
||||||
|
name="libsamplerate Commercial Use License";
|
||||||
|
} ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
} ) args
|
@ -1562,6 +1562,10 @@ rec {
|
|||||||
inherit fetchurl stdenv;
|
inherit fetchurl stdenv;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
ffmpeg_svn = import ../development/libraries/ffmpeg_svn_snapshot {
|
||||||
|
inherit fetchurl stdenv;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
# commented out because it's using the new configuration style proposal which is unstable
|
# commented out because it's using the new configuration style proposal which is unstable
|
||||||
# needs some testing ..
|
# needs some testing ..
|
||||||
@ -1808,6 +1812,11 @@ rec {
|
|||||||
inherit fetchurl stdenv pkgconfig libusb;
|
inherit fetchurl stdenv pkgconfig libusb;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# commented out because it's using the new configuration style proposal which is unstable
|
||||||
|
#libsamplerate = (import ../development/libraries/libsamplerate) {
|
||||||
|
# inherit fetchurl stdenv mkDerivationByConfigruation pkgconfig lib;
|
||||||
|
#};
|
||||||
|
|
||||||
libgsf = import ../development/libraries/libgsf {
|
libgsf = import ../development/libraries/libgsf {
|
||||||
inherit fetchurl stdenv perl perlXMLParser pkgconfig libxml2 gettext;
|
inherit fetchurl stdenv perl perlXMLParser pkgconfig libxml2 gettext;
|
||||||
inherit (gnome) glib;
|
inherit (gnome) glib;
|
||||||
@ -2231,6 +2240,11 @@ rec {
|
|||||||
|
|
||||||
### DEVELOPMENT / LIBRARIES / HASKELL
|
### DEVELOPMENT / LIBRARIES / HASKELL
|
||||||
|
|
||||||
|
# usage: see ghcPkgUtil.sh - use setup-new2 because of PATH_DELIMITER
|
||||||
|
ghcPkgUtil = runCommand "ghcPkgUtil-internal"
|
||||||
|
{ ghcPkgUtil = ../development/libraries/haskell/generic/ghcPkgUtil.sh; }
|
||||||
|
"mkdir -p $out/nix-support; cp $ghcPkgUtil \$out/nix-support/setup-hook;";
|
||||||
|
|
||||||
|
|
||||||
uulib64 = import ../development/libraries/haskell/uulib { # !!! remove?
|
uulib64 = import ../development/libraries/haskell/uulib { # !!! remove?
|
||||||
inherit stdenv fetchurl ghc;
|
inherit stdenv fetchurl ghc;
|
||||||
@ -3806,6 +3820,21 @@ rec {
|
|||||||
inherit (xlibs) libXmu;
|
inherit (xlibs) libXmu;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# commented out because it's using the new configuration style proposal which is unstable
|
||||||
|
/*
|
||||||
|
sox = import ../applications/misc/audio/sox {
|
||||||
|
inherit fetchurl stdenv lib mkDerivationByConfigruation;
|
||||||
|
# optional features
|
||||||
|
inherit alsaLib /*libao*/;
|
||||||
|
inherit libsndfile libogg flac libmad lame libsamplerate;
|
||||||
|
# Using the default nix ffmpeg I get this error when linking
|
||||||
|
# .libs/libsox_la-ffmpeg.o: In function `audio_decode_frame':
|
||||||
|
# /tmp/nix-7957-1/sox-14.0.0/src/ffmpeg.c:130: undefined reference to `avcodec_decode_audio2
|
||||||
|
# That's why I'v added ffmpeg_svn
|
||||||
|
ffmpeg = ffmpeg_svn;
|
||||||
|
};
|
||||||
|
*/
|
||||||
|
|
||||||
spoofax = import ../applications/editors/eclipse/plugins/spoofax {
|
spoofax = import ../applications/editors/eclipse/plugins/spoofax {
|
||||||
inherit fetchurl stdenv;
|
inherit fetchurl stdenv;
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user