removed mkDerivationByConfiguration, using composableDerivation instead
qgis, vim_configurable both work now svn path=/nixpkgs/trunk/; revision=13661
This commit is contained in:
@@ -1,43 +1,9 @@
|
||||
args:
|
||||
( args.mkDerivationByConfiguration {
|
||||
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"; };
|
||||
args: with args;
|
||||
let inherit (args.composableDerivation) composableDerivation edf; in
|
||||
composableDerivation {
|
||||
|
||||
# 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
|
||||
*/
|
||||
};
|
||||
initial = {
|
||||
|
||||
optionals = [ "libsndfile" "libogg" "flac" "ffmpeg" "libmad" "lame"
|
||||
/* "amr-wb" "amr-nb" */
|
||||
"libsamplerate" /* "ladspa" */ ];
|
||||
|
||||
|
||||
extraAttrs = co : {
|
||||
name = "sox-14.0.0";
|
||||
|
||||
src = args.fetchurl {
|
||||
@@ -45,6 +11,43 @@ args:
|
||||
sha256 = "1l7v04nlvb96y0w9crvm6nq8g50yxp3bkv6nb1c205s982inlalc";
|
||||
};
|
||||
|
||||
flags =
|
||||
# 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
|
||||
edf { name = "alsa"; enable = { buildInputs = [alsaLib]; }; }
|
||||
// edf { name = "libao"; enable = { buildInputs = [libao]; }; }
|
||||
// edf { name = "oss"; }
|
||||
// edf { name = "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
|
||||
*/
|
||||
|
||||
|
||||
cfg = {
|
||||
ossSupport = false;
|
||||
sun_audioSupport = false;
|
||||
};
|
||||
|
||||
|
||||
optionals = [ "libsndfile" "libogg" "flac" "ffmpeg" "libmad" "lame"
|
||||
/* "amr-wb" "amr-nb" */
|
||||
"libsamplerate" /* "ladspa" */ ];
|
||||
|
||||
|
||||
meta = {
|
||||
description = "Sample Rate Converter for audio";
|
||||
homepage = http://www.mega-nerd.com/SRC/index.html;
|
||||
@@ -55,4 +58,4 @@ args:
|
||||
} ];
|
||||
};
|
||||
};
|
||||
} ) args
|
||||
}
|
||||
|
||||
@@ -1,26 +1,17 @@
|
||||
args: with args.lib; with args;
|
||||
args: with args;
|
||||
stdenv.mkDerivation {
|
||||
|
||||
let
|
||||
co = chooseOptionsByFlags {
|
||||
inherit args;
|
||||
flagDescr = {
|
||||
mandatory = { buildInputs = [ "libX11" ]; cfgOption = "--with-x"; };
|
||||
# many options to add here ... :)
|
||||
# many of them can be set by configuration file I think..
|
||||
};
|
||||
};
|
||||
name = "mrxvt-0.5.3";
|
||||
|
||||
in stdenv.mkDerivation {
|
||||
buildInputs = [libX11];
|
||||
|
||||
inherit (co) buildInputs configureFlags;
|
||||
configureFlags="--with-x";
|
||||
|
||||
src = fetchurl {
|
||||
url = mirror://sourceforge/materm/mrxvt-0.5.3.tar.gz;
|
||||
sha256 = "04flnn58hp4qvvk6jzyipsj13v1qyrjabgbw5laz5cqxvxzpncp2";
|
||||
};
|
||||
|
||||
name = "mrxvt-0.5.3";
|
||||
|
||||
meta = {
|
||||
description = "multitabbed lightweight terminal emulator basd on rxvt supporting transparency, backgroundimages, freetype fonts,..";
|
||||
homepage = http://sourceforge.net/projects/materm;
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
args: with args;
|
||||
let edf = composableDerivation.edf;
|
||||
optionIncLib = name : attr : " -D${name}_INCLUDE_DIR=${__getAttr attr args}/incclude"
|
||||
+ " -D${name}_LIBRARY=${__getAttr attr args}/lib "; # lib 64?
|
||||
in
|
||||
composableDerivation.composableDerivation {
|
||||
initial = {
|
||||
|
||||
buildInputs = [ gdal cmake qt flex bison proj geos x11 sqlite gsl];
|
||||
cfgOption = [
|
||||
# without this option it can't find sqlite libs yet (missing symbols..) (TODO)
|
||||
"-DWITH_INTERNAL_SQLITE3=TRUE"
|
||||
];
|
||||
|
||||
name = "qgis-${version}";
|
||||
|
||||
# src = args.fetchsvn { url=https://svn.qgis.org/repos/qgis/trunk/qgis;
|
||||
# md5="ac0560e0a2d4e6258c8639f1e9b56df3"; rev="7704"; };
|
||||
src = fetchurl {
|
||||
url = "http://download.osgeo.org/qgis/src/qgis_${version}.tar.gz";
|
||||
sha256 = "17vqbld4wr9jyn1s5n0bkpaminsgc2dzcgdfk8ic168xydnwa7b3";
|
||||
};
|
||||
|
||||
meta = {
|
||||
description = "user friendly Open Source Geographic Information System";
|
||||
homepage = http://www.qgis.org;
|
||||
# you can choose one of the following licenses:
|
||||
license = [ "GPL" ];
|
||||
};
|
||||
|
||||
phases = "unpackPhase buildPhase installPhase";
|
||||
buildPhase = ''pwd;echo XXXXXXXXX; VERBOSE=1 cmake -DCMAKE_INSTALL_PREFIX=$out ''${cfgOption} ..'';
|
||||
|
||||
postUnpack = ''
|
||||
export CMAKE_SYSTEM_LIBRARY_PATH=
|
||||
for i in $buildInputs $propagatedBuildInputs; do
|
||||
CMAKE_SYSTEM_LIBRARY_PATH=$i/lib:$CMAKE_SYSTEM_LIBRARY_PATH
|
||||
done
|
||||
'';
|
||||
|
||||
#configurePhase="./autogen.sh --prefix=\$out --with-gdal=\$gdal/bin/gdal-config --with-qtdir=\$qt";
|
||||
# buildPhases="unpackPhase buildPhase";
|
||||
|
||||
};
|
||||
}
|
||||
@@ -1,74 +0,0 @@
|
||||
args:
|
||||
let optionIncLib = name : attr : " -D${name}_INCLUDE_DIR=${__getAttr attr args}/inc"
|
||||
+ " -D${name}_LIBRARY=${__getAttr attr args}/lib "; # lib 64?
|
||||
in
|
||||
( args.mkDerivationByConfiguration {
|
||||
|
||||
flagConfig = {
|
||||
mandatory = {
|
||||
buildInputs = [ "gdal" "cmake" "qt" "flex" "bison" "proj" "geos" "x11" "sqlite" "gsl"];
|
||||
cfgOption = [ (optionIncLib "GEOS" "geos")
|
||||
(optionIncLib "PROJ" "proj")
|
||||
(optionIncLib "QT_X11_X11" "qt")
|
||||
(optionIncLib "QT_X11_Xext" "qt")
|
||||
(optionIncLib "QT_X11_m" "glibc")
|
||||
(optionIncLib "SQLITE3" "sqlite")
|
||||
|
||||
"-DQT_FONTCONFIG_LIBRARY=${args.fontconfig}/lib"
|
||||
"-DQT_FREETYPE_LIBRARY=${args.freetype}/lib"
|
||||
"-DQT_PNG_LIBRARY=${args.libpng}/lib"
|
||||
"-DQT_X11_ICE_LIBRARY=${args.libICE}/lib"
|
||||
"-DQT_X11_SM_LIBRARY=${args.libSM}/lib"
|
||||
"-DQT_XCURSOR_LIBRARY=${args.libXcursor}/lib"
|
||||
"-DQT_XINERAMA_LIBRARY=${args.libXinerama}/lib"
|
||||
"-DQT_XRANDR_LIBRARY=${args.libXrandr}/lib"
|
||||
"-DQT_XRENDER_LIBRARY=${args.libXrender}/lib"
|
||||
"-DQT_ZLIB_LIBRARY=${args.zlib}/lib"
|
||||
];
|
||||
|
||||
/* advanced options - feel free to add them if you have time to
|
||||
"-DPROJ_INCLUDE_DIR"
|
||||
"-DPROJ_LIBRARY"
|
||||
"-DQT_X11_X11_LIBRARY"
|
||||
"-DQT_X11_Xext_LIBRARY"
|
||||
"-DQT_X11_m_LIBRARY"
|
||||
"-DSQLITE3_INCLUDE_DIR"
|
||||
"-DSQLITE3_LIBRARY"
|
||||
-DQT_FONTCONFIG_LIBRARY (ADVANCED)
|
||||
-DQT_FREETYPE_LIBRARY (ADVANCED)
|
||||
-DQT_PNG_LIBRARY (ADVANCED)
|
||||
-DQT_X11_ICE_LIBRARY (ADVANCED)
|
||||
-DQT_X11_SM_LIBRARY (ADVANCED)
|
||||
-DQT_XCURSOR_LIBRARY (ADVANCED)
|
||||
-DQT_XINERAMA_LIBRARY (ADVANCED)
|
||||
-DQT_XRANDR_LIBRARY (ADVANCED)
|
||||
-DQT_XRENDER_LIBRARY (ADVANCED)
|
||||
-DQT_ZLIB_LIBRARY (ADVANCED)
|
||||
*/
|
||||
};
|
||||
};
|
||||
|
||||
#inherit geos proj x11 libXext;
|
||||
|
||||
extraAttrs = co : {
|
||||
|
||||
name = "qgis-svn";
|
||||
|
||||
src = args.fetchsvn { url=https://svn.qgis.org/repos/qgis/trunk/qgis;
|
||||
md5="ac0560e0a2d4e6258c8639f1e9b56df3"; rev="7704"; };
|
||||
|
||||
meta = {
|
||||
description = "user friendly Open Source Geographic Information System";
|
||||
homepage = http://www.qgis.org;
|
||||
# you can choose one of the following licenses:
|
||||
license = [ "GPL" ];
|
||||
};
|
||||
|
||||
phases = "unpackPhase buildPhase installPhase";
|
||||
buildPhase = "cmake -DCMAKE_INSTALL_PREFIX=\$out ${co.configureFlags} .";
|
||||
|
||||
#configurePhase="./autogen.sh --prefix=\$out --with-gdal=\$gdal/bin/gdal-config --with-qtdir=\$qt";
|
||||
# buildPhases="unpackPhase buildPhase";
|
||||
};
|
||||
|
||||
} ) args
|
||||
Reference in New Issue
Block a user