Remove getConfig helper function
An expression like ‘getConfig [ "cabal" "libraryProfiling" ] false’ can be written more concisely as ‘config.cabal.libraryProfiling or false’.
This commit is contained in:
parent
0062d0f11d
commit
e6077fbc46
|
@ -46,14 +46,14 @@ composableDerivation {} {
|
||||||
;
|
;
|
||||||
|
|
||||||
cfg = {
|
cfg = {
|
||||||
pythonSupport = getConfig [ "vim" "python" ] true;
|
pythonSupport = config.vim.python or true;
|
||||||
darwinSupport = getConfig [ "vim" "darwin" ] false;
|
darwinSupport = config.vim.darwin or false;
|
||||||
nlsSupport = getConfig [ "vim" "nls" ] false;
|
nlsSupport = config.vim.nls or false;
|
||||||
tclSupport = getConfig [ "vim" "tcl" ] false;
|
tclSupport = config.vim.tcl or false;
|
||||||
multibyteSupport = getConfig [ "vim" "multibyte" ] false;
|
multibyteSupport = config.vim.multibyte or false;
|
||||||
cscopeSupport = getConfig [ "vim" "cscope" ] false;
|
cscopeSupport = config.vim.cscope or false;
|
||||||
# add .nix filetype detection and minimal syntax highlighting support
|
# add .nix filetype detection and minimal syntax highlighting support
|
||||||
ftNixSupport = getConfig [ "vim" "ftNix" ] true;
|
ftNixSupport = config.vim.ftNix or true;
|
||||||
};
|
};
|
||||||
|
|
||||||
#--enable-gui=OPTS X11 GUI default=auto OPTS=auto/no/gtk/gtk2/gnome/gnome2/motif/athena/neXtaw/photon/carbon
|
#--enable-gui=OPTS X11 GUI default=auto OPTS=auto/no/gtk/gtk2/gnome/gnome2/motif/athena/neXtaw/photon/carbon
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{getConfig, ...}@a:
|
{ config, ... }@a:
|
||||||
|
|
||||||
# You can set gui by exporting GRASS_GUI=..
|
# You can set gui by exporting GRASS_GUI=..
|
||||||
# see http://grass.itc.it/gdp/html_grass64/g.gui.html
|
# see http://grass.itc.it/gdp/html_grass64/g.gui.html
|
||||||
|
@ -36,31 +36,31 @@ a.composableDerivation.composableDerivation {} (fix: {
|
||||||
];
|
];
|
||||||
|
|
||||||
cfg = {
|
cfg = {
|
||||||
_64bitSupport = getConfig ["grass" "64bitSupport"] true;
|
_64bitSupport = config.grass."64bitSupport" or true;
|
||||||
cursesSupport = getConfig ["grass" "curses"] true;
|
cursesSupport = config.grass.curses or true;
|
||||||
gdalSupport = getConfig ["grass" "gdal"] true;
|
gdalSupport = config.grass.gdal or true;
|
||||||
pythonSupport = getConfig ["grass" "python"] true;
|
pythonSupport = config.grass.python or true;
|
||||||
wxwidgetsSupport = getConfig ["grass" "wxwidgets"] true;
|
wxwidgetsSupport = config.grass.wxwidgets or true;
|
||||||
readlineSupport = getConfig ["grass" "readline"] true;
|
readlineSupport = config.grass.readline or true;
|
||||||
jpegSupport = getConfig ["grass" "jpeg"] true;
|
jpegSupport = config.grass.jpeg or true;
|
||||||
tiffSupport = getConfig ["grass" "tiff"] true;
|
tiffSupport = config.grass.tiff or true;
|
||||||
pngSupport = getConfig ["grass" "png"] true;
|
pngSupport = config.grass.png or true;
|
||||||
tcltkSupport = getConfig ["grass" "tcltk"] true;
|
tcltkSupport = config.grass.tcltk or true;
|
||||||
postgresSupport = getConfig ["grass" "postgres"] true;
|
postgresSupport = config.grass.postgres or true;
|
||||||
mysqlSupport = getConfig ["grass" "mysql"] true;
|
mysqlSupport = config.grass.mysql or true;
|
||||||
sqliteSupport = getConfig ["grass" "sqlite"] true;
|
sqliteSupport = config.grass.sqlite or true;
|
||||||
ffmpegSupport = getConfig ["grass" "ffmpeg"] true;
|
ffmpegSupport = config.grass.ffmpeg or true;
|
||||||
openglSupport = getConfig ["grass" "opengl"] true;
|
openglSupport = config.grass.opengl or true;
|
||||||
odbcSupport = getConfig ["grass" "odbc"] false; # fails to find libodbc - why ?
|
odbcSupport = config.grass.odbc or false; # fails to find libodbc - why ?
|
||||||
fftwSupport = getConfig ["grass" "fftw"] true;
|
fftwSupport = config.grass.fftw or true;
|
||||||
blasSupport = getConfig ["grass" "blas"] true;
|
blasSupport = config.grass.blas or true;
|
||||||
lapackSupport = getConfig ["grass" "lapack"] true;
|
lapackSupport = config.grass.lapack or true;
|
||||||
cairoSupport = getConfig ["grass" "cairo"] true;
|
cairoSupport = config.grass.cairo or true;
|
||||||
motifSupport = getConfig ["grass" "motif"] true;
|
motifSupport = config.grass.motif or true;
|
||||||
freetypeSupport = getConfig ["grass" "freetype"] true;
|
freetypeSupport = config.grass.freetype or true;
|
||||||
projSupport = getConfig ["grass" "proj"] true;
|
projSupport = config.grass.proj or true;
|
||||||
opendwgSupport = getConfig ["grass" "dwg"] false;
|
opendwgSupport = config.grass.dwg or false;
|
||||||
largefileSupport = getConfig ["grass" "largefile"] true;
|
largefileSupport = config.grass.largefile or true;
|
||||||
};
|
};
|
||||||
|
|
||||||
# ?? NLS support: no
|
# ?? NLS support: no
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{ stdenv, getConfig, fetchurl, makeWrapper, which
|
{ stdenv, config, fetchurl, makeWrapper, which
|
||||||
|
|
||||||
# default dependencies
|
# default dependencies
|
||||||
, bzip2, flac, speex
|
, bzip2, flac, speex
|
||||||
|
@ -22,10 +22,12 @@
|
||||||
, libselinux # config.selinux
|
, libselinux # config.selinux
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
with stdenv.lib;
|
||||||
mkConfigurable = stdenv.lib.mapAttrs (flag: default: getConfig ["chromium" flag] default);
|
|
||||||
|
|
||||||
config = mkConfigurable {
|
let
|
||||||
|
mkConfigurable = mapAttrs (flag: default: attrByPath ["chromium" flag] default config);
|
||||||
|
|
||||||
|
cfg = mkConfigurable {
|
||||||
channel = "stable";
|
channel = "stable";
|
||||||
selinux = false;
|
selinux = false;
|
||||||
nacl = false;
|
nacl = false;
|
||||||
|
@ -34,18 +36,19 @@ let
|
||||||
gnomeKeyring = false;
|
gnomeKeyring = false;
|
||||||
proprietaryCodecs = true;
|
proprietaryCodecs = true;
|
||||||
cups = false;
|
cups = false;
|
||||||
pulseaudio = getConfig ["pulseaudio"] true;
|
pulseaudio = config.pulseaudio or true;
|
||||||
};
|
};
|
||||||
|
|
||||||
sourceInfo = builtins.getAttr config.channel (import ./sources.nix);
|
sourceInfo = builtins.getAttr cfg.channel (import ./sources.nix);
|
||||||
|
|
||||||
mkGypFlags = with stdenv.lib; let
|
mkGypFlags =
|
||||||
sanitize = value:
|
let
|
||||||
if value == true then "1"
|
sanitize = value:
|
||||||
else if value == false then "0"
|
if value == true then "1"
|
||||||
else "${value}";
|
else if value == false then "0"
|
||||||
toFlag = key: value: "-D${key}=${sanitize value}";
|
else "${value}";
|
||||||
in attrs: concatStringsSep " " (attrValues (mapAttrs toFlag attrs));
|
toFlag = key: value: "-D${key}=${sanitize value}";
|
||||||
|
in attrs: concatStringsSep " " (attrValues (mapAttrs toFlag attrs));
|
||||||
|
|
||||||
gypFlagsUseSystemLibs = {
|
gypFlagsUseSystemLibs = {
|
||||||
use_system_bzip2 = true;
|
use_system_bzip2 = true;
|
||||||
|
@ -56,7 +59,7 @@ let
|
||||||
use_system_libpng = true;
|
use_system_libpng = true;
|
||||||
use_system_libxml = true;
|
use_system_libxml = true;
|
||||||
use_system_speex = true;
|
use_system_speex = true;
|
||||||
use_system_ssl = config.openssl;
|
use_system_ssl = cfg.openssl;
|
||||||
use_system_stlport = true;
|
use_system_stlport = true;
|
||||||
use_system_xdg_utils = true;
|
use_system_xdg_utils = true;
|
||||||
use_system_yasm = true;
|
use_system_yasm = true;
|
||||||
|
@ -78,12 +81,12 @@ let
|
||||||
];
|
];
|
||||||
|
|
||||||
seccompPatch = let
|
seccompPatch = let
|
||||||
pre22 = stdenv.lib.versionOlder sourceInfo.version "22.0.0.0";
|
pre22 = versionOlder sourceInfo.version "22.0.0.0";
|
||||||
in if pre22 then ./enable_seccomp.patch else ./enable_seccomp22.patch;
|
in if pre22 then ./enable_seccomp.patch else ./enable_seccomp22.patch;
|
||||||
|
|
||||||
# XXX: this reverts r151720 to prevent http://crbug.com/143623
|
# XXX: this reverts r151720 to prevent http://crbug.com/143623
|
||||||
maybeRevertZlibChanges = let
|
maybeRevertZlibChanges = let
|
||||||
below22 = stdenv.lib.versionOlder sourceInfo.version "22.0.0.0";
|
below22 = versionOlder sourceInfo.version "22.0.0.0";
|
||||||
patch = fetchurl {
|
patch = fetchurl {
|
||||||
name = "revert-r151720";
|
name = "revert-r151720";
|
||||||
url = "http://git.chromium.org/gitweb/?p=chromium.git;a=commitdiff_plain;"
|
url = "http://git.chromium.org/gitweb/?p=chromium.git;a=commitdiff_plain;"
|
||||||
|
@ -91,7 +94,7 @@ let
|
||||||
+ "h=0fabb4fda7059a8757422e8a44e70deeab28e698";
|
+ "h=0fabb4fda7059a8757422e8a44e70deeab28e698";
|
||||||
sha256 = "0n0d6mkg89g8q63cifapzpg9dxfs2n6xvk4k13szhymvf67b77pf";
|
sha256 = "0n0d6mkg89g8q63cifapzpg9dxfs2n6xvk4k13szhymvf67b77pf";
|
||||||
};
|
};
|
||||||
in stdenv.lib.optional (!below22) patch;
|
in optional (!below22) patch;
|
||||||
|
|
||||||
in stdenv.mkDerivation rec {
|
in stdenv.mkDerivation rec {
|
||||||
name = "${packageName}-${version}";
|
name = "${packageName}-${version}";
|
||||||
|
@ -108,28 +111,28 @@ in stdenv.mkDerivation rec {
|
||||||
which makeWrapper
|
which makeWrapper
|
||||||
python perl pkgconfig
|
python perl pkgconfig
|
||||||
nspr udev
|
nspr udev
|
||||||
(if config.openssl then openssl else nss)
|
(if cfg.openssl then openssl else nss)
|
||||||
utillinux alsaLib
|
utillinux alsaLib
|
||||||
gcc bison gperf
|
gcc bison gperf
|
||||||
krb5
|
krb5
|
||||||
glib gtk dbus_glib
|
glib gtk dbus_glib
|
||||||
libXScrnSaver libXcursor mesa
|
libXScrnSaver libXcursor mesa
|
||||||
] ++ stdenv.lib.optional config.gnomeKeyring libgnome_keyring
|
] ++ optional cfg.gnomeKeyring libgnome_keyring
|
||||||
++ stdenv.lib.optionals config.gnome [ gconf libgcrypt ]
|
++ optionals cfg.gnome [ gconf libgcrypt ]
|
||||||
++ stdenv.lib.optional config.selinux libselinux
|
++ optional cfg.selinux libselinux
|
||||||
++ stdenv.lib.optional config.cups libgcrypt
|
++ optional cfg.cups libgcrypt
|
||||||
++ stdenv.lib.optional config.pulseaudio pulseaudio;
|
++ optional cfg.pulseaudio pulseaudio;
|
||||||
|
|
||||||
opensslPatches = stdenv.lib.optional config.openssl openssl.patches;
|
opensslPatches = optional cfg.openssl openssl.patches;
|
||||||
|
|
||||||
prePatch = "patchShebangs .";
|
prePatch = "patchShebangs .";
|
||||||
|
|
||||||
patches = stdenv.lib.optional (!config.selinux) seccompPatch
|
patches = optional (!cfg.selinux) seccompPatch
|
||||||
++ stdenv.lib.optional config.cups ./cups_allow_deprecated.patch
|
++ optional cfg.cups ./cups_allow_deprecated.patch
|
||||||
++ stdenv.lib.optional config.pulseaudio ./pulseaudio_array_bounds.patch
|
++ optional cfg.pulseaudio ./pulseaudio_array_bounds.patch
|
||||||
++ maybeRevertZlibChanges;
|
++ maybeRevertZlibChanges;
|
||||||
|
|
||||||
postPatch = stdenv.lib.optionalString config.openssl ''
|
postPatch = optionalString cfg.openssl ''
|
||||||
cat $opensslPatches | patch -p1 -d third_party/openssl/openssl
|
cat $opensslPatches | patch -p1 -d third_party/openssl/openssl
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
@ -137,21 +140,21 @@ in stdenv.mkDerivation rec {
|
||||||
linux_use_gold_binary = false;
|
linux_use_gold_binary = false;
|
||||||
linux_use_gold_flags = false;
|
linux_use_gold_flags = false;
|
||||||
proprietary_codecs = false;
|
proprietary_codecs = false;
|
||||||
use_gnome_keyring = config.gnomeKeyring;
|
use_gnome_keyring = cfg.gnomeKeyring;
|
||||||
use_gconf = config.gnome;
|
use_gconf = cfg.gnome;
|
||||||
use_gio = config.gnome;
|
use_gio = cfg.gnome;
|
||||||
use_pulseaudio = config.pulseaudio;
|
use_pulseaudio = cfg.pulseaudio;
|
||||||
disable_nacl = !config.nacl;
|
disable_nacl = !cfg.nacl;
|
||||||
use_openssl = config.openssl;
|
use_openssl = cfg.openssl;
|
||||||
selinux = config.selinux;
|
selinux = cfg.selinux;
|
||||||
use_cups = config.cups;
|
use_cups = cfg.cups;
|
||||||
} // stdenv.lib.optionalAttrs config.proprietaryCodecs {
|
} // optionalAttrs cfg.proprietaryCodecs {
|
||||||
# enable support for the H.264 codec
|
# enable support for the H.264 codec
|
||||||
proprietary_codecs = true;
|
proprietary_codecs = true;
|
||||||
ffmpeg_branding = "Chrome";
|
ffmpeg_branding = "Chrome";
|
||||||
} // stdenv.lib.optionalAttrs (stdenv.system == "x86_64-linux") {
|
} // optionalAttrs (stdenv.system == "x86_64-linux") {
|
||||||
target_arch = "x64";
|
target_arch = "x64";
|
||||||
} // stdenv.lib.optionalAttrs (stdenv.system == "i686-linux") {
|
} // optionalAttrs (stdenv.system == "i686-linux") {
|
||||||
target_arch = "ia32";
|
target_arch = "ia32";
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -203,11 +206,11 @@ in stdenv.mkDerivation rec {
|
||||||
done
|
done
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = {
|
||||||
description = "Chromium, an open source web browser";
|
description = "Chromium, an open source web browser";
|
||||||
homepage = http://www.chromium.org/;
|
homepage = http://www.chromium.org/;
|
||||||
maintainers = with stdenv.lib.maintainers; [ goibhniu chaoflow ];
|
maintainers = with maintainers; [ goibhniu chaoflow ];
|
||||||
license = licenses.bsd3;
|
license = licenses.bsd3;
|
||||||
platforms = with stdenv.lib.platforms; linux;
|
platforms = platforms.linux;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,8 +9,8 @@
|
||||||
The documentation is availible at http://github.com/MarcWeber/nix-repository-manager/raw/master/README
|
The documentation is availible at http://github.com/MarcWeber/nix-repository-manager/raw/master/README
|
||||||
|
|
||||||
*/
|
*/
|
||||||
{ getConfig }:
|
{ config }:
|
||||||
localTarName: publishedSrcSnapshot:
|
localTarName: publishedSrcSnapshot:
|
||||||
if getConfig ["sourceFromHead" "useLocalRepos"] false then
|
if config.sourceFromHead.useLocalRepos or false then
|
||||||
"${getConfig ["sourceFromHead" "managedRepoDir"] "/set/sourceFromHead.managedRepoDir/please"}/dist/${localTarName}"
|
"${config.sourceFromHead.managedRepoDir or "/set/sourceFromHead.managedRepoDir/please"}/dist/${localTarName}"
|
||||||
else publishedSrcSnapshot
|
else publishedSrcSnapshot
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{stdenv, fetchurl, gfortran, readline, ncurses, perl, flex,
|
{stdenv, fetchurl, gfortran, readline, ncurses, perl, flex,
|
||||||
bison, autoconf, automake, sourceFromHead, getConfig, lib, atlas, gperf, python, glibc, gnuplot, texinfo, texLive, qhull, libX11}:
|
bison, autoconf, automake, sourceFromHead, config, lib, atlas, gperf, python, glibc, gnuplot, texinfo, texLive, qhull, libX11}:
|
||||||
|
|
||||||
let commonBuildInputs = [gfortran readline ncurses perl glibc qhull libX11 texinfo]; in
|
let commonBuildInputs = [gfortran readline ncurses perl glibc qhull libX11 texinfo]; in
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@ stdenv.mkDerivation ({
|
||||||
license = "GPL-3";
|
license = "GPL-3";
|
||||||
};
|
};
|
||||||
} // (
|
} // (
|
||||||
if (getConfig ["octave" "devVersion"] false) then {
|
if (config.octave.devVersion or false) then {
|
||||||
name = "octave-hg"; # developement version mercurial repo
|
name = "octave-hg"; # developement version mercurial repo
|
||||||
# REGION AUTO UPDATE: { name="octave"; type = "hg"; url = "http://www.octave.org/hg/octave"; }
|
# REGION AUTO UPDATE: { name="octave"; type = "hg"; url = "http://www.octave.org/hg/octave"; }
|
||||||
src = sourceFromHead "octave-03b414516dd8.tar.gz"
|
src = sourceFromHead "octave-03b414516dd8.tar.gz"
|
||||||
|
@ -27,7 +27,7 @@ stdenv.mkDerivation ({
|
||||||
export HOME=$TMP
|
export HOME=$TMP
|
||||||
'';
|
'';
|
||||||
buildInputs = commonBuildInputs ++ [ flex bison autoconf automake gperf gnuplot texLive ]
|
buildInputs = commonBuildInputs ++ [ flex bison autoconf automake gperf gnuplot texLive ]
|
||||||
++ lib.optionals (getConfig ["octave" "atlas"] true) [ python atlas ];
|
++ lib.optionals (config.octave.atlas or true) [ python atlas ];
|
||||||
# it does build, but documentation doesn't.. So just remove that directory
|
# it does build, but documentation doesn't.. So just remove that directory
|
||||||
# from the buildfile
|
# from the buildfile
|
||||||
buildPhase = ''
|
buildPhase = ''
|
||||||
|
@ -44,6 +44,6 @@ stdenv.mkDerivation ({
|
||||||
sha256 = "1lm4v85kdic4n5yxwzrdb0v6dc6nw06ljgx1q8hfkmi146kpg7s6";
|
sha256 = "1lm4v85kdic4n5yxwzrdb0v6dc6nw06ljgx1q8hfkmi146kpg7s6";
|
||||||
};
|
};
|
||||||
buildInputs = commonBuildInputs ++ [ flex bison autoconf automake python ]
|
buildInputs = commonBuildInputs ++ [ flex bison autoconf automake python ]
|
||||||
++ lib.optionals (getConfig ["octave" "atlas"] true) [ python atlas ];
|
++ lib.optionals (config.octave.atlas or true) [ python atlas ];
|
||||||
}
|
}
|
||||||
))
|
))
|
||||||
|
|
|
@ -121,23 +121,23 @@ composableDerivation {} ( fixed : let inherit (fixed.fixed) version; in {
|
||||||
};
|
};
|
||||||
|
|
||||||
cfg = {
|
cfg = {
|
||||||
mysqlSupport = getConfig ["php" "mysql"] true;
|
mysqlSupport = config.php.mysql or true;
|
||||||
mysqliSupport = getConfig ["php" "mysqli"] true;
|
mysqliSupport = config.php.mysqli or true;
|
||||||
pdo_mysqlSupport = getConfig ["php" "pdo_mysql"] true;
|
pdo_mysqlSupport = config.php.pdo_mysql or true;
|
||||||
libxml2Support = getConfig ["php" "libxml2"] true;
|
libxml2Support = config.php.libxml2 or true;
|
||||||
apxs2Support = getConfig ["php" "apxs2"] true;
|
apxs2Support = config.php.apxs2 or true;
|
||||||
bcmathSupport = getConfig ["php" "bcmath"] true;
|
bcmathSupport = config.php.bcmath or true;
|
||||||
socketsSupport = getConfig ["php" "sockets"] true;
|
socketsSupport = config.php.sockets or true;
|
||||||
curlSupport = getConfig ["php" "curl"] true;
|
curlSupport = config.php.curl or true;
|
||||||
gettextSupport = getConfig ["php" "gettext"] true;
|
gettextSupport = config.php.gettext or true;
|
||||||
postgresqlSupport = getConfig ["php" "postgresql"] true;
|
postgresqlSupport = config.php.postgresql or true;
|
||||||
readlineSupport = getConfig ["php" "readline"] true;
|
readlineSupport = config.php.readline or true;
|
||||||
sqliteSupport = getConfig ["php" "sqlite"] true;
|
sqliteSupport = config.php.sqlite or true;
|
||||||
soapSupport = getConfig ["php" "soap"] true;
|
soapSupport = config.php.soap or true;
|
||||||
zlibSupport = getConfig ["php" "zlib"] true;
|
zlibSupport = config.php.zlib or true;
|
||||||
opensslSupport = getConfig ["php" "openssl"] true;
|
opensslSupport = config.php.openssl or true;
|
||||||
mbstringSupport = getConfig ["php" "mbstring"] true;
|
mbstringSupport = config.php.mbstring or true;
|
||||||
gdSupport = getConfig ["php" "gd"] true;
|
gdSupport = config.php.gd or true;
|
||||||
};
|
};
|
||||||
|
|
||||||
configurePhase = ''
|
configurePhase = ''
|
||||||
|
|
|
@ -121,23 +121,23 @@ composableDerivation {} ( fixed : let inherit (fixed.fixed) version; in {
|
||||||
};
|
};
|
||||||
|
|
||||||
cfg = {
|
cfg = {
|
||||||
mysqlSupport = getConfig ["php" "mysql"] true;
|
mysqlSupport = config.php.mysql or true;
|
||||||
mysqliSupport = getConfig ["php" "mysqli"] true;
|
mysqliSupport = config.php.mysqli or true;
|
||||||
pdo_mysqlSupport = getConfig ["php" "pdo_mysql"] true;
|
pdo_mysqlSupport = config.php.pdo_mysql or true;
|
||||||
libxml2Support = getConfig ["php" "libxml2"] true;
|
libxml2Support = config.php.libxml2 or true;
|
||||||
apxs2Support = getConfig ["php" "apxs2"] true;
|
apxs2Support = config.php.apxs2 or true;
|
||||||
bcmathSupport = getConfig ["php" "bcmath"] true;
|
bcmathSupport = config.php.bcmath or true;
|
||||||
socketsSupport = getConfig ["php" "sockets"] true;
|
socketsSupport = config.php.sockets or true;
|
||||||
curlSupport = getConfig ["php" "curl"] true;
|
curlSupport = config.php.curl or true;
|
||||||
gettextSupport = getConfig ["php" "gettext"] true;
|
gettextSupport = config.php.gettext or true;
|
||||||
postgresqlSupport = getConfig ["php" "postgresql"] true;
|
postgresqlSupport = config.php.postgresql or true;
|
||||||
readlineSupport = getConfig ["php" "readline"] true;
|
readlineSupport = config.php.readline or true;
|
||||||
sqliteSupport = getConfig ["php" "sqlite"] true;
|
sqliteSupport = config.php.sqlite or true;
|
||||||
soapSupport = getConfig ["php" "soap"] true;
|
soapSupport = config.php.soap or true;
|
||||||
zlibSupport = getConfig ["php" "zlib"] true;
|
zlibSupport = config.php.zlib or true;
|
||||||
opensslSupport = getConfig ["php" "openssl"] true;
|
opensslSupport = config.php.openssl or true;
|
||||||
mbstringSupport = getConfig ["php" "mbstring"] true;
|
mbstringSupport = config.php.mbstring or true;
|
||||||
gdSupport = getConfig ["php" "gd"] true;
|
gdSupport = config.php.gd or true;
|
||||||
};
|
};
|
||||||
|
|
||||||
configurePhase = ''
|
configurePhase = ''
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{stdenv, getConfig, fetchurl, callPackage}:
|
{ stdenv, config, fetchurl, callPackage }:
|
||||||
|
|
||||||
let
|
let
|
||||||
inherit (stdenv.lib) fold optional;
|
inherit (stdenv.lib) fold optional;
|
||||||
|
@ -36,7 +36,7 @@ in
|
||||||
if builtins.pathExists file then import (builtins.toPath file)
|
if builtins.pathExists file then import (builtins.toPath file)
|
||||||
else null;
|
else null;
|
||||||
in
|
in
|
||||||
getConfig [ "gems" name ] fallback;
|
stdenv.lib.attrByPath [ "gems" name ] fallback config;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
generated = getLocalGemFun "generated";
|
generated = getLocalGemFun "generated";
|
||||||
|
|
|
@ -1,11 +1,12 @@
|
||||||
{ stdenv, getConfig, fetchurl, libX11, libXext, libXinerama, libXrandr
|
{ stdenv, config, fetchurl, libX11, libXext, libXinerama, libXrandr
|
||||||
, libXrender, fontconfig, freetype, openal }:
|
, libXrender, fontconfig, freetype, openal }:
|
||||||
|
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation {
|
||||||
name = "oilrush";
|
name = "oilrush";
|
||||||
src =
|
src =
|
||||||
let
|
let
|
||||||
url = getConfig [ "oilrush" "url" ] null;
|
url = config.oilrush.url or null;
|
||||||
sha256 = getConfig [ "oilrush" "sha256" ] null;
|
sha256 = config.oilrush.sha256 or null;
|
||||||
in
|
in
|
||||||
assert url != null && sha256 != null;
|
assert url != null && sha256 != null;
|
||||||
fetchurl { inherit url sha256; };
|
fetchurl { inherit url sha256; };
|
||||||
|
|
|
@ -78,11 +78,7 @@ let
|
||||||
|
|
||||||
# Allow setting the platform in the config file. Otherwise, let's use a reasonable default (pc)
|
# Allow setting the platform in the config file. Otherwise, let's use a reasonable default (pc)
|
||||||
platform = if platform_ != null then platform_
|
platform = if platform_ != null then platform_
|
||||||
else getConfig [ "platform" ] (import ./platforms.nix).pc;
|
else config.platform or (import ./platforms.nix).pc;
|
||||||
|
|
||||||
# Return an attribute from the Nixpkgs configuration file, or
|
|
||||||
# a default value if the attribute doesn't exist.
|
|
||||||
getConfig = attrPath: default: lib.attrByPath attrPath default config;
|
|
||||||
|
|
||||||
|
|
||||||
# Helper functions that are exported through `pkgs'.
|
# Helper functions that are exported through `pkgs'.
|
||||||
|
@ -101,7 +97,7 @@ let
|
||||||
# (un-overriden) set of packages, allowing packageOverrides
|
# (un-overriden) set of packages, allowing packageOverrides
|
||||||
# attributes to refer to the original attributes (e.g. "foo =
|
# attributes to refer to the original attributes (e.g. "foo =
|
||||||
# ... pkgs.foo ...").
|
# ... pkgs.foo ...").
|
||||||
pkgs = applyGlobalOverrides (getConfig ["packageOverrides"] (pkgs: {}));
|
pkgs = applyGlobalOverrides (config.packageOverrides or (pkgs: {}));
|
||||||
|
|
||||||
|
|
||||||
# Return the complete set of packages, after applying the overrides
|
# Return the complete set of packages, after applying the overrides
|
||||||
|
@ -178,7 +174,7 @@ let
|
||||||
### Helper functions.
|
### Helper functions.
|
||||||
|
|
||||||
|
|
||||||
inherit lib config getConfig stdenvAdapters;
|
inherit lib config stdenvAdapters;
|
||||||
|
|
||||||
inherit (lib) lowPrio hiPrio appendToName makeOverridable;
|
inherit (lib) lowPrio hiPrio appendToName makeOverridable;
|
||||||
|
|
||||||
|
@ -214,7 +210,7 @@ let
|
||||||
stdenvCross
|
stdenvCross
|
||||||
else
|
else
|
||||||
let
|
let
|
||||||
changer = getConfig ["replaceStdenv"] null;
|
changer = config.replaceStdenv or null;
|
||||||
in if changer != null then
|
in if changer != null then
|
||||||
changer {
|
changer {
|
||||||
# We import again all-packages to avoid recursivities.
|
# We import again all-packages to avoid recursivities.
|
||||||
|
@ -277,7 +273,7 @@ let
|
||||||
|
|
||||||
fetchgitrevision = import ../build-support/fetchgitrevision runCommand git;
|
fetchgitrevision = import ../build-support/fetchgitrevision runCommand git;
|
||||||
|
|
||||||
fetchmtn = callPackage ../build-support/fetchmtn (getConfig ["fetchmtn"] {});
|
fetchmtn = callPackage ../build-support/fetchmtn (config.fetchmtn or {});
|
||||||
|
|
||||||
fetchsvn = import ../build-support/fetchsvn {
|
fetchsvn = import ../build-support/fetchsvn {
|
||||||
inherit stdenv subversion openssh;
|
inherit stdenv subversion openssh;
|
||||||
|
@ -417,7 +413,7 @@ let
|
||||||
autojump = callPackage ../tools/misc/autojump { };
|
autojump = callPackage ../tools/misc/autojump { };
|
||||||
|
|
||||||
avahi = callPackage ../development/libraries/avahi {
|
avahi = callPackage ../development/libraries/avahi {
|
||||||
qt4Support = getConfig [ "avahi" "qt4Support" ] false;
|
qt4Support = config.avahi.qt4Support or false;
|
||||||
};
|
};
|
||||||
|
|
||||||
aws = callPackage ../tools/virtualization/aws { };
|
aws = callPackage ../tools/virtualization/aws { };
|
||||||
|
@ -837,7 +833,7 @@ let
|
||||||
};
|
};
|
||||||
|
|
||||||
grub = callPackage_i686 ../tools/misc/grub {
|
grub = callPackage_i686 ../tools/misc/grub {
|
||||||
buggyBiosCDSupport = getConfig ["grub" "buggyBiosCDSupport"] true;
|
buggyBiosCDSupport = config.grub.buggyBiosCDSupport or true;
|
||||||
};
|
};
|
||||||
|
|
||||||
grub2 = callPackage ../tools/misc/grub/2.0x.nix { };
|
grub2 = callPackage ../tools/misc/grub/2.0x.nix { };
|
||||||
|
@ -1635,7 +1631,7 @@ let
|
||||||
};
|
};
|
||||||
|
|
||||||
truecrypt = callPackage ../applications/misc/truecrypt {
|
truecrypt = callPackage ../applications/misc/truecrypt {
|
||||||
wxGUI = getConfig [ "truecrypt" "wxGUI" ] true;
|
wxGUI = config.truecrypt.wxGUI or true;
|
||||||
};
|
};
|
||||||
|
|
||||||
ttmkfdir = callPackage ../tools/misc/ttmkfdir { };
|
ttmkfdir = callPackage ../tools/misc/ttmkfdir { };
|
||||||
|
@ -2744,14 +2740,14 @@ let
|
||||||
inherit
|
inherit
|
||||||
stdenv fetchurl lib composableDerivation autoconf automake
|
stdenv fetchurl lib composableDerivation autoconf automake
|
||||||
flex bison apacheHttpd mysql libxml2 readline
|
flex bison apacheHttpd mysql libxml2 readline
|
||||||
zlib curl gd postgresql openssl pkgconfig sqlite getConfig libiconv libjpeg libpng;
|
zlib curl gd postgresql openssl pkgconfig sqlite config libiconv libjpeg libpng;
|
||||||
};
|
};
|
||||||
|
|
||||||
php5_3 = makeOverridable (import ../development/interpreters/php/5.3.nix) {
|
php5_3 = makeOverridable (import ../development/interpreters/php/5.3.nix) {
|
||||||
inherit
|
inherit
|
||||||
stdenv fetchurl lib composableDerivation autoconf automake
|
stdenv fetchurl lib composableDerivation autoconf automake
|
||||||
flex bison apacheHttpd mysql libxml2 readline
|
flex bison apacheHttpd mysql libxml2 readline
|
||||||
zlib curl gd postgresql openssl pkgconfig sqlite getConfig libiconv libjpeg libpng;
|
zlib curl gd postgresql openssl pkgconfig sqlite config libiconv libjpeg libpng;
|
||||||
};
|
};
|
||||||
|
|
||||||
php_apc = callPackage ../development/libraries/php-apc { };
|
php_apc = callPackage ../development/libraries/php-apc { };
|
||||||
|
@ -2821,7 +2817,7 @@ let
|
||||||
rubySqlite3 = callPackage ../development/ruby-modules/sqlite3 { };
|
rubySqlite3 = callPackage ../development/ruby-modules/sqlite3 { };
|
||||||
|
|
||||||
rLang = callPackage ../development/interpreters/r-lang {
|
rLang = callPackage ../development/interpreters/r-lang {
|
||||||
withBioconductor = getConfig ["rLang" "withBioconductor"] false;
|
withBioconductor = config.rLang.withBioconductor or false;
|
||||||
};
|
};
|
||||||
|
|
||||||
rubygemsFun = ruby: builderDefsPackage (import ../development/interpreters/ruby/rubygems.nix) {
|
rubygemsFun = ruby: builderDefsPackage (import ../development/interpreters/ruby/rubygems.nix) {
|
||||||
|
@ -2859,7 +2855,7 @@ let
|
||||||
*/
|
*/
|
||||||
|
|
||||||
sourceFromHead = import ../build-support/source-from-head-fun.nix {
|
sourceFromHead = import ../build-support/source-from-head-fun.nix {
|
||||||
inherit getConfig;
|
inherit config;
|
||||||
};
|
};
|
||||||
|
|
||||||
ecj = callPackage ../development/eclipse/ecj { };
|
ecj = callPackage ../development/eclipse/ecj { };
|
||||||
|
@ -3175,10 +3171,10 @@ let
|
||||||
radare = callPackage ../development/tools/analysis/radare {
|
radare = callPackage ../development/tools/analysis/radare {
|
||||||
inherit (gnome) vte;
|
inherit (gnome) vte;
|
||||||
lua = lua5;
|
lua = lua5;
|
||||||
useX11 = getConfig ["radare" "useX11"] false;
|
useX11 = config.radare.useX11 or false;
|
||||||
pythonBindings = getConfig ["radare" "pythonBindings"] false;
|
pythonBindings = config.radare.pythonBindings or false;
|
||||||
rubyBindings = getConfig ["radare" "rubyBindings"] false;
|
rubyBindings = config.radare.rubyBindings or false;
|
||||||
luaBindings = getConfig ["radare" "luaBindings"] false;
|
luaBindings = config.radare.luaBindings or false;
|
||||||
};
|
};
|
||||||
|
|
||||||
ragel = callPackage ../development/tools/parsing/ragel { };
|
ragel = callPackage ../development/tools/parsing/ragel { };
|
||||||
|
@ -3610,19 +3606,19 @@ let
|
||||||
|
|
||||||
glibc29 = callPackage ../development/libraries/glibc/2.9 {
|
glibc29 = callPackage ../development/libraries/glibc/2.9 {
|
||||||
kernelHeaders = linuxHeaders;
|
kernelHeaders = linuxHeaders;
|
||||||
installLocales = getConfig [ "glibc" "locales" ] false;
|
installLocales = config.glibc.locales or false;
|
||||||
};
|
};
|
||||||
|
|
||||||
glibc29Cross = forceBuildDrv (makeOverridable (import ../development/libraries/glibc/2.9) {
|
glibc29Cross = forceBuildDrv (makeOverridable (import ../development/libraries/glibc/2.9) {
|
||||||
inherit stdenv fetchurl;
|
inherit stdenv fetchurl;
|
||||||
gccCross = gccCrossStageStatic;
|
gccCross = gccCrossStageStatic;
|
||||||
kernelHeaders = linuxHeadersCross;
|
kernelHeaders = linuxHeadersCross;
|
||||||
installLocales = getConfig [ "glibc" "locales" ] false;
|
installLocales = config.glibc.locales or false;
|
||||||
});
|
});
|
||||||
|
|
||||||
glibc213 = (callPackage ../development/libraries/glibc/2.13 {
|
glibc213 = (callPackage ../development/libraries/glibc/2.13 {
|
||||||
kernelHeaders = linuxHeaders;
|
kernelHeaders = linuxHeaders;
|
||||||
installLocales = getConfig [ "glibc" "locales" ] false;
|
installLocales = config.glibc.locales or false;
|
||||||
machHeaders = null;
|
machHeaders = null;
|
||||||
hurdHeaders = null;
|
hurdHeaders = null;
|
||||||
gccCross = null;
|
gccCross = null;
|
||||||
|
@ -3634,7 +3630,7 @@ let
|
||||||
inherit stdenv fetchurl;
|
inherit stdenv fetchurl;
|
||||||
gccCross = gccCrossStageStatic;
|
gccCross = gccCrossStageStatic;
|
||||||
kernelHeaders = if crossGNU then gnu.hurdHeaders else linuxHeadersCross;
|
kernelHeaders = if crossGNU then gnu.hurdHeaders else linuxHeadersCross;
|
||||||
installLocales = getConfig [ "glibc" "locales" ] false;
|
installLocales = config.glibc.locales or false;
|
||||||
}
|
}
|
||||||
// lib.optionalAttrs crossGNU {
|
// lib.optionalAttrs crossGNU {
|
||||||
inherit (gnu) machHeaders hurdHeaders libpthreadHeaders mig;
|
inherit (gnu) machHeaders hurdHeaders libpthreadHeaders mig;
|
||||||
|
@ -3643,7 +3639,7 @@ let
|
||||||
|
|
||||||
glibc214 = (callPackage ../development/libraries/glibc/2.14 {
|
glibc214 = (callPackage ../development/libraries/glibc/2.14 {
|
||||||
kernelHeaders = linuxHeaders;
|
kernelHeaders = linuxHeaders;
|
||||||
installLocales = getConfig [ "glibc" "locales" ] false;
|
installLocales = config.glibc.locales or false;
|
||||||
machHeaders = null;
|
machHeaders = null;
|
||||||
hurdHeaders = null;
|
hurdHeaders = null;
|
||||||
gccCross = null;
|
gccCross = null;
|
||||||
|
@ -3655,7 +3651,7 @@ let
|
||||||
inherit stdenv fetchurl;
|
inherit stdenv fetchurl;
|
||||||
gccCross = gccCrossStageStatic;
|
gccCross = gccCrossStageStatic;
|
||||||
kernelHeaders = if crossGNU then gnu.hurdHeaders else linuxHeadersCross;
|
kernelHeaders = if crossGNU then gnu.hurdHeaders else linuxHeadersCross;
|
||||||
installLocales = getConfig [ "glibc" "locales" ] false;
|
installLocales = config.glibc.locales or false;
|
||||||
}
|
}
|
||||||
// lib.optionalAttrs crossGNU {
|
// lib.optionalAttrs crossGNU {
|
||||||
inherit (gnu) machHeaders hurdHeaders libpthreadHeaders mig;
|
inherit (gnu) machHeaders hurdHeaders libpthreadHeaders mig;
|
||||||
|
@ -3674,7 +3670,7 @@ let
|
||||||
|
|
||||||
eglibc = callPackage ../development/libraries/eglibc {
|
eglibc = callPackage ../development/libraries/eglibc {
|
||||||
kernelHeaders = linuxHeaders;
|
kernelHeaders = linuxHeaders;
|
||||||
installLocales = getConfig [ "glibc" "locales" ] false;
|
installLocales = config.glibc.locales or false;
|
||||||
};
|
};
|
||||||
|
|
||||||
glibcLocales = callPackage ../development/libraries/glibc/2.13/locales.nix { };
|
glibcLocales = callPackage ../development/libraries/glibc/2.13/locales.nix { };
|
||||||
|
@ -3782,11 +3778,11 @@ let
|
||||||
};
|
};
|
||||||
|
|
||||||
gnutls = callPackage ../development/libraries/gnutls {
|
gnutls = callPackage ../development/libraries/gnutls {
|
||||||
guileBindings = getConfig ["gnutls" "guile"] true;
|
guileBindings = config.gnutls.guile or true;
|
||||||
};
|
};
|
||||||
|
|
||||||
gnutls2 = callPackage ../development/libraries/gnutls/2.12.nix {
|
gnutls2 = callPackage ../development/libraries/gnutls/2.12.nix {
|
||||||
guileBindings = getConfig ["gnutls" "guile"] true;
|
guileBindings = config.gnutls.guile or true;
|
||||||
};
|
};
|
||||||
|
|
||||||
gnutls_without_guile = gnutls.override { guileBindings = false; };
|
gnutls_without_guile = gnutls.override { guileBindings = false; };
|
||||||
|
@ -3975,7 +3971,7 @@ let
|
||||||
libaal = callPackage ../development/libraries/libaal { };
|
libaal = callPackage ../development/libraries/libaal { };
|
||||||
|
|
||||||
libao = callPackage ../development/libraries/libao {
|
libao = callPackage ../development/libraries/libao {
|
||||||
usePulseAudio = getConfig [ "pulseaudio" ] true;
|
usePulseAudio = config.pulseaudio or true;
|
||||||
};
|
};
|
||||||
|
|
||||||
libarchive = callPackage ../development/libraries/libarchive { };
|
libarchive = callPackage ../development/libraries/libarchive { };
|
||||||
|
@ -4146,7 +4142,7 @@ let
|
||||||
libimobiledevice = callPackage ../development/libraries/libimobiledevice { };
|
libimobiledevice = callPackage ../development/libraries/libimobiledevice { };
|
||||||
|
|
||||||
libiodbc = callPackage ../development/libraries/libiodbc {
|
libiodbc = callPackage ../development/libraries/libiodbc {
|
||||||
useGTK = getConfig [ "libiodbc" "gtk" ] false;
|
useGTK = config.libiodbc.gtk or false;
|
||||||
};
|
};
|
||||||
|
|
||||||
liblastfmSF = callPackage ../development/libraries/liblastfmSF { };
|
liblastfmSF = callPackage ../development/libraries/liblastfmSF { };
|
||||||
|
@ -4618,12 +4614,12 @@ let
|
||||||
pangoxsl = callPackage ../development/libraries/pangoxsl { };
|
pangoxsl = callPackage ../development/libraries/pangoxsl { };
|
||||||
|
|
||||||
pcre = callPackage ../development/libraries/pcre {
|
pcre = callPackage ../development/libraries/pcre {
|
||||||
unicodeSupport = getConfig ["pcre" "unicode"] true;
|
unicodeSupport = config.pcre.unicode or true;
|
||||||
cplusplusSupport = !stdenv ? isDietLibC;
|
cplusplusSupport = !stdenv ? isDietLibC;
|
||||||
};
|
};
|
||||||
|
|
||||||
pcre_8_30 = callPackage ../development/libraries/pcre/8.30.nix {
|
pcre_8_30 = callPackage ../development/libraries/pcre/8.30.nix {
|
||||||
unicodeSupport = getConfig ["pcre" "unicode"] true;
|
unicodeSupport = config.pcre.unicode or true;
|
||||||
cplusplusSupport = !stdenv ? isDietLibC;
|
cplusplusSupport = !stdenv ? isDietLibC;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -5357,7 +5353,7 @@ let
|
||||||
#monetdb = callPackage ../servers/sql/monetdb { };
|
#monetdb = callPackage ../servers/sql/monetdb { };
|
||||||
|
|
||||||
mongodb = callPackage ../servers/nosql/mongodb {
|
mongodb = callPackage ../servers/nosql/mongodb {
|
||||||
useV8 = (getConfig ["mongodb" "useV8"] false);
|
useV8 = (config.mongodb.useV8 or false);
|
||||||
};
|
};
|
||||||
|
|
||||||
mysql4 = import ../servers/sql/mysql {
|
mysql4 = import ../servers/sql/mysql {
|
||||||
|
@ -6074,8 +6070,8 @@ let
|
||||||
pam_usb = callPackage ../os-specific/linux/pam_usb { };
|
pam_usb = callPackage ../os-specific/linux/pam_usb { };
|
||||||
|
|
||||||
pcmciaUtils = callPackage ../os-specific/linux/pcmciautils {
|
pcmciaUtils = callPackage ../os-specific/linux/pcmciautils {
|
||||||
firmware = getConfig ["pcmciaUtils" "firmware"] [];
|
firmware = config.pcmciaUtils.firmware or [];
|
||||||
config = getConfig ["pcmciaUtils" "config"] null;
|
config = config.pcmciaUtils.config or null;
|
||||||
};
|
};
|
||||||
|
|
||||||
phat = callPackage ../development/libraries/phat {
|
phat = callPackage ../development/libraries/phat {
|
||||||
|
@ -6667,7 +6663,7 @@ let
|
||||||
dvswitch = callPackage ../applications/video/dvswitch { };
|
dvswitch = callPackage ../applications/video/dvswitch { };
|
||||||
|
|
||||||
dwm = callPackage ../applications/window-managers/dwm {
|
dwm = callPackage ../applications/window-managers/dwm {
|
||||||
patches = getConfig [ "dwm" "patches" ] [];
|
patches = config.dwm.patches or [];
|
||||||
};
|
};
|
||||||
|
|
||||||
eaglemode = callPackage ../applications/misc/eaglemode { };
|
eaglemode = callPackage ../applications/misc/eaglemode { };
|
||||||
|
@ -6700,8 +6696,8 @@ let
|
||||||
literal backslashes have changed. */
|
literal backslashes have changed. */
|
||||||
else overrideGCC stdenv gcc44;
|
else overrideGCC stdenv gcc44;
|
||||||
|
|
||||||
xaw3dSupport = getConfig [ "emacs" "xaw3dSupport" ] false;
|
xaw3dSupport = config.emacs.xaw3dSupport or false;
|
||||||
gtkGUI = getConfig [ "emacs" "gtkSupport" ] true;
|
gtkGUI = config.emacs.gtkSupport or true;
|
||||||
};
|
};
|
||||||
|
|
||||||
emacs23 = callPackage ../applications/editors/emacs-23 {
|
emacs23 = callPackage ../applications/editors/emacs-23 {
|
||||||
|
@ -6877,7 +6873,7 @@ let
|
||||||
grass = import ../applications/misc/grass {
|
grass = import ../applications/misc/grass {
|
||||||
inherit (xlibs) libXmu libXext libXp libX11 libXt libSM libICE libXpm
|
inherit (xlibs) libXmu libXext libXp libX11 libXt libSM libICE libXpm
|
||||||
libXaw libXrender;
|
libXaw libXrender;
|
||||||
inherit getConfig composableDerivation stdenv fetchurl
|
inherit config composableDerivation stdenv fetchurl
|
||||||
lib flex bison cairo fontconfig
|
lib flex bison cairo fontconfig
|
||||||
gdal zlib ncurses gdbm proj pkgconfig swig
|
gdal zlib ncurses gdbm proj pkgconfig swig
|
||||||
blas liblapack libjpeg libpng mysql unixODBC mesa postgresql python
|
blas liblapack libjpeg libpng mysql unixODBC mesa postgresql python
|
||||||
|
@ -6942,11 +6938,11 @@ let
|
||||||
flashplayer9 = callPackage ../applications/networking/browsers/mozilla-plugins/flashplayer-9 { };
|
flashplayer9 = callPackage ../applications/networking/browsers/mozilla-plugins/flashplayer-9 { };
|
||||||
|
|
||||||
flashplayer10 = callPackage ../applications/networking/browsers/mozilla-plugins/flashplayer-10 {
|
flashplayer10 = callPackage ../applications/networking/browsers/mozilla-plugins/flashplayer-10 {
|
||||||
debug = getConfig ["flashplayer" "debug"] false;
|
debug = config.flashplayer.debug or false;
|
||||||
};
|
};
|
||||||
|
|
||||||
flashplayer11 = callPackage ../applications/networking/browsers/mozilla-plugins/flashplayer-11 {
|
flashplayer11 = callPackage ../applications/networking/browsers/mozilla-plugins/flashplayer-11 {
|
||||||
debug = getConfig ["flashplayer" "debug"] false;
|
debug = config.flashplayer.debug or false;
|
||||||
# !!! Fix the dependency on two different builds of nss.
|
# !!! Fix the dependency on two different builds of nss.
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -7040,7 +7036,7 @@ let
|
||||||
gnunet08 = callPackage ../applications/networking/p2p/gnunet/0.8.nix {
|
gnunet08 = callPackage ../applications/networking/p2p/gnunet/0.8.nix {
|
||||||
inherit (gnome) libglade;
|
inherit (gnome) libglade;
|
||||||
guile = guile_1_8;
|
guile = guile_1_8;
|
||||||
gtkSupport = getConfig [ "gnunet" "gtkSupport" ] true;
|
gtkSupport = config.gnunet.gtkSupport or true;
|
||||||
};
|
};
|
||||||
|
|
||||||
gnunet = callPackage ../applications/networking/p2p/gnunet { };
|
gnunet = callPackage ../applications/networking/p2p/gnunet { };
|
||||||
|
@ -7401,7 +7397,7 @@ let
|
||||||
avahi = avahi.override {
|
avahi = avahi.override {
|
||||||
withLibdnssdCompat = true;
|
withLibdnssdCompat = true;
|
||||||
};
|
};
|
||||||
jackSupport = getConfig [ "mumble" "jackSupport" ] false;
|
jackSupport = config.mumble.jackSupport or false;
|
||||||
};
|
};
|
||||||
|
|
||||||
mutt = callPackage ../applications/networking/mailreaders/mutt { };
|
mutt = callPackage ../applications/networking/mailreaders/mutt { };
|
||||||
|
@ -7493,9 +7489,9 @@ let
|
||||||
picard = callPackage ../applications/audio/picard { };
|
picard = callPackage ../applications/audio/picard { };
|
||||||
|
|
||||||
pidgin = callPackage ../applications/networking/instant-messengers/pidgin {
|
pidgin = callPackage ../applications/networking/instant-messengers/pidgin {
|
||||||
openssl = if (getConfig ["pidgin" "openssl"] true) then openssl else null;
|
openssl = if (config.pidgin.openssl or true) then openssl else null;
|
||||||
gnutls = if (getConfig ["pidgin" "gnutls"] false) then gnutls else null;
|
gnutls = if (config.pidgin.gnutls or false) then gnutls else null;
|
||||||
libgcrypt = if (getConfig ["pidgin" "gnutls"] false) then libgcrypt else null;
|
libgcrypt = if (config.pidgin.gnutls or false) then libgcrypt else null;
|
||||||
inherit (gnome) startupnotification;
|
inherit (gnome) startupnotification;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -7584,7 +7580,7 @@ let
|
||||||
|
|
||||||
rsync = callPackage ../applications/networking/sync/rsync {
|
rsync = callPackage ../applications/networking/sync/rsync {
|
||||||
enableACLs = !(stdenv.isDarwin || stdenv.isSunOS);
|
enableACLs = !(stdenv.isDarwin || stdenv.isSunOS);
|
||||||
enableCopyDevicesPatch = (getConfig ["rsync" "enableCopyDevicesPatch"] false);
|
enableCopyDevicesPatch = (config.rsync.enableCopyDevicesPatch or false);
|
||||||
};
|
};
|
||||||
|
|
||||||
rxvt = callPackage ../applications/misc/rxvt { };
|
rxvt = callPackage ../applications/misc/rxvt { };
|
||||||
|
@ -7617,7 +7613,7 @@ let
|
||||||
siproxd = callPackage ../applications/networking/siproxd { };
|
siproxd = callPackage ../applications/networking/siproxd { };
|
||||||
|
|
||||||
skype_linux = callPackage_i686 ../applications/networking/instant-messengers/skype {
|
skype_linux = callPackage_i686 ../applications/networking/instant-messengers/skype {
|
||||||
usePulseAudio = getConfig [ "pulseaudio" ] false; # disabled by default (the 100% cpu bug)
|
usePulseAudio = config.pulseaudio or false; # disabled by default (the 100% cpu bug)
|
||||||
};
|
};
|
||||||
|
|
||||||
st = callPackage ../applications/misc/st { };
|
st = callPackage ../applications/misc/st { };
|
||||||
|
@ -7712,7 +7708,7 @@ let
|
||||||
taskjuggler = callPackage ../applications/misc/taskjuggler {
|
taskjuggler = callPackage ../applications/misc/taskjuggler {
|
||||||
# KDE support is not working yet.
|
# KDE support is not working yet.
|
||||||
inherit (kde3) kdelibs kdebase;
|
inherit (kde3) kdelibs kdebase;
|
||||||
withKde = getConfig [ "taskJuggler" "kde" ] false;
|
withKde = config.taskJuggler.kde or false;
|
||||||
};
|
};
|
||||||
|
|
||||||
taskwarrior = callPackage ../applications/misc/taskwarrior { };
|
taskwarrior = callPackage ../applications/misc/taskwarrior { };
|
||||||
|
@ -7768,7 +7764,7 @@ let
|
||||||
|
|
||||||
unison = callPackage ../applications/networking/sync/unison {
|
unison = callPackage ../applications/networking/sync/unison {
|
||||||
inherit (ocamlPackages) lablgtk;
|
inherit (ocamlPackages) lablgtk;
|
||||||
enableX11 = getConfig [ "unison" "enableX11" ] true;
|
enableX11 = config.unison.enableX11 or true;
|
||||||
};
|
};
|
||||||
|
|
||||||
uucp = callPackage ../tools/misc/uucp { };
|
uucp = callPackage ../tools/misc/uucp { };
|
||||||
|
@ -7798,19 +7794,15 @@ let
|
||||||
vimHugeX = vim_configurable;
|
vimHugeX = vim_configurable;
|
||||||
|
|
||||||
vim_configurable = import ../applications/editors/vim/configurable.nix {
|
vim_configurable = import ../applications/editors/vim/configurable.nix {
|
||||||
inherit (pkgs) fetchurl stdenv ncurses pkgconfig gettext composableDerivation lib
|
inherit (pkgs) fetchurl stdenv ncurses pkgconfig gettext composableDerivation lib config;
|
||||||
getConfig;
|
inherit (pkgs.xlibs) libX11 libXext libSM libXpm libXt libXaw libXau libXmu libICE;
|
||||||
inherit (pkgs.xlibs) libX11 libXext libSM libXpm
|
|
||||||
libXt libXaw libXau libXmu libICE;
|
|
||||||
inherit (pkgs) glib gtk;
|
inherit (pkgs) glib gtk;
|
||||||
features = "huge"; # one of tiny, small, normal, big or huge
|
features = "huge"; # one of tiny, small, normal, big or huge
|
||||||
# optional features by passing
|
# optional features by passing
|
||||||
# python
|
# python
|
||||||
# TODO mzschemeinterp perlinterp
|
# TODO mzschemeinterp perlinterp
|
||||||
inherit (pkgs) python perl tcl ruby /*x11*/;
|
inherit (pkgs) python perl tcl ruby /*x11*/;
|
||||||
|
|
||||||
lua = pkgs.lua5;
|
lua = pkgs.lua5;
|
||||||
|
|
||||||
# optional features by flags
|
# optional features by flags
|
||||||
flags = [ "X11" ]; # only flag "X11" by now
|
flags = [ "X11" ]; # only flag "X11" by now
|
||||||
};
|
};
|
||||||
|
@ -7859,7 +7851,7 @@ let
|
||||||
libixp = libixp_for_wmii;
|
libixp = libixp_for_wmii;
|
||||||
inherit fetchurl /* fetchhg */ stdenv gawk;
|
inherit fetchurl /* fetchhg */ stdenv gawk;
|
||||||
inherit (xlibs) libX11 xextproto libXt libXext;
|
inherit (xlibs) libX11 xextproto libXt libXext;
|
||||||
includeUnpack = getConfig ["stdenv" "includeUnpack"] false;
|
includeUnpack = config.stdenv.includeUnpack or false;
|
||||||
};
|
};
|
||||||
|
|
||||||
wordnet = callPackage ../applications/misc/wordnet { };
|
wordnet = callPackage ../applications/misc/wordnet { };
|
||||||
|
@ -7871,23 +7863,23 @@ let
|
||||||
inherit stdenv makeWrapper makeDesktopItem browser browserName desktopName nameSuffix icon;
|
inherit stdenv makeWrapper makeDesktopItem browser browserName desktopName nameSuffix icon;
|
||||||
plugins =
|
plugins =
|
||||||
let
|
let
|
||||||
enableAdobeFlash = getConfig [ browserName "enableAdobeFlash" ] true;
|
enableAdobeFlash = config.browserNameenableAdobeFlash or true;
|
||||||
enableGnash = getConfig [ browserName "enableGnash" ] false;
|
enableGnash = config.browserNameenableGnash or false;
|
||||||
in
|
in
|
||||||
assert !(enableGnash && enableAdobeFlash);
|
assert !(enableGnash && enableAdobeFlash);
|
||||||
([ ]
|
([ ]
|
||||||
++ lib.optional enableGnash gnash
|
++ lib.optional enableGnash gnash
|
||||||
++ lib.optional enableAdobeFlash flashplayer
|
++ lib.optional enableAdobeFlash flashplayer
|
||||||
# RealPlayer is disabled by default for legal reasons.
|
# RealPlayer is disabled by default for legal reasons.
|
||||||
++ lib.optional (system != "i686-linux" && getConfig [browserName "enableRealPlayer"] false) RealPlayer
|
++ lib.optional (system != "i686-linux" && config.browserNameenableRealPlayer or false) RealPlayer
|
||||||
++ lib.optional (getConfig [browserName "enableDjvu"] false) (djview4)
|
++ lib.optional (config.browserNameenableDjvu or false) (djview4)
|
||||||
++ lib.optional (getConfig [browserName "enableMPlayer"] false) (MPlayerPlugin browser)
|
++ lib.optional (config.browserNameenableMPlayer or false) (MPlayerPlugin browser)
|
||||||
++ lib.optional (getConfig [browserName "enableGeckoMediaPlayer"] false) gecko_mediaplayer
|
++ lib.optional (config.browserNameenableGeckoMediaPlayer or false) gecko_mediaplayer
|
||||||
++ lib.optional (supportsJDK && getConfig [browserName "jre"] false && jrePlugin ? mozillaPlugin) jrePlugin
|
++ lib.optional (supportsJDK && config.browserNamejre or false && jrePlugin ? mozillaPlugin) jrePlugin
|
||||||
++ lib.optional (getConfig [browserName "enableGoogleTalkPlugin"] false) google_talk_plugin
|
++ lib.optional (config.browserNameenableGoogleTalkPlugin or false) google_talk_plugin
|
||||||
);
|
);
|
||||||
libs =
|
libs =
|
||||||
if getConfig [ browserName "enableQuakeLive" ] false
|
if config.browserNameenableQuakeLive or false
|
||||||
then with xlibs; [ stdenv.gcc libX11 libXxf86dga libXxf86vm libXext libXt alsaLib zlib ]
|
then with xlibs; [ stdenv.gcc libX11 libXxf86dga libXxf86vm libXext libXt alsaLib zlib ]
|
||||||
else [ ];
|
else [ ];
|
||||||
};
|
};
|
||||||
|
@ -8716,8 +8708,8 @@ let
|
||||||
|
|
||||||
ghostscript = callPackage ../misc/ghostscript {
|
ghostscript = callPackage ../misc/ghostscript {
|
||||||
x11Support = false;
|
x11Support = false;
|
||||||
cupsSupport = getConfig [ "ghostscript" "cups" ] true;
|
cupsSupport = config.ghostscript.cups or true;
|
||||||
gnuFork = getConfig [ "ghostscript" "gnu" ] false;
|
gnuFork = config.ghostscript.gnu or false;
|
||||||
};
|
};
|
||||||
|
|
||||||
ghostscriptX = appendToName "with-X" (ghostscript.override {
|
ghostscriptX = appendToName "with-X" (ghostscript.override {
|
||||||
|
@ -8753,13 +8745,13 @@ let
|
||||||
nix = nixStable;
|
nix = nixStable;
|
||||||
|
|
||||||
nixStable = callPackage ../tools/package-management/nix {
|
nixStable = callPackage ../tools/package-management/nix {
|
||||||
storeDir = getConfig [ "nix" "storeDir" ] "/nix/store";
|
storeDir = config.nix.storeDir or "/nix/store";
|
||||||
stateDir = getConfig [ "nix" "stateDir" ] "/nix/var";
|
stateDir = config.nix.stateDir or "/nix/var";
|
||||||
};
|
};
|
||||||
|
|
||||||
nixUnstable = callPackage ../tools/package-management/nix/unstable.nix {
|
nixUnstable = callPackage ../tools/package-management/nix/unstable.nix {
|
||||||
storeDir = getConfig [ "nix" "storeDir" ] "/nix/store";
|
storeDir = config.nix.storeDir or "/nix/store";
|
||||||
stateDir = getConfig [ "nix" "stateDir" ] "/nix/var";
|
stateDir = config.nix.stateDir or "/nix/var";
|
||||||
};
|
};
|
||||||
|
|
||||||
nixCustomFun = src: preConfigure: enableScripts: configureFlags:
|
nixCustomFun = src: preConfigure: enableScripts: configureFlags:
|
||||||
|
@ -8779,13 +8771,13 @@ let
|
||||||
disnix = callPackage ../tools/package-management/disnix { };
|
disnix = callPackage ../tools/package-management/disnix { };
|
||||||
|
|
||||||
disnix_activation_scripts = callPackage ../tools/package-management/disnix/activation-scripts {
|
disnix_activation_scripts = callPackage ../tools/package-management/disnix/activation-scripts {
|
||||||
enableApacheWebApplication = getConfig ["disnix" "enableApacheWebApplication"] false;
|
enableApacheWebApplication = config.disnix.enableApacheWebApplication or false;
|
||||||
enableAxis2WebService = getConfig ["disnix" "enableAxis2WebService"] false;
|
enableAxis2WebService = config.disnix.enableAxis2WebService or false;
|
||||||
enableEjabberdDump = getConfig ["disnix" "enableEjabberdDump"] false;
|
enableEjabberdDump = config.disnix.enableEjabberdDump or false;
|
||||||
enableMySQLDatabase = getConfig ["disnix" "enableMySQLDatabase"] false;
|
enableMySQLDatabase = config.disnix.enableMySQLDatabase or false;
|
||||||
enablePostgreSQLDatabase = getConfig ["disnix" "enablePostgreSQLDatabase"] false;
|
enablePostgreSQLDatabase = config.disnix.enablePostgreSQLDatabase or false;
|
||||||
enableSubversionRepository = getConfig ["disnix" "enableSubversionRepository"] false;
|
enableSubversionRepository = config.disnix.enableSubversionRepository or false;
|
||||||
enableTomcatWebApplication = getConfig ["disnix" "enableTomcatWebApplication"] false;
|
enableTomcatWebApplication = config.disnix.enableTomcatWebApplication or false;
|
||||||
};
|
};
|
||||||
|
|
||||||
disnixos = callPackage ../tools/package-management/disnix/disnixos { };
|
disnixos = callPackage ../tools/package-management/disnix/disnixos { };
|
||||||
|
@ -8830,12 +8822,12 @@ let
|
||||||
xlockmore = callPackage ../misc/screensavers/xlockmore { };
|
xlockmore = callPackage ../misc/screensavers/xlockmore { };
|
||||||
|
|
||||||
saneBackends = callPackage ../misc/sane-backends {
|
saneBackends = callPackage ../misc/sane-backends {
|
||||||
gt68xxFirmware = getConfig ["sane" "gt68xxFirmware"] null;
|
gt68xxFirmware = config.sane.gt68xxFirmware or null;
|
||||||
hotplugSupport = getConfig ["sane" "hotplugSupport"] true;
|
hotplugSupport = config.sane.hotplugSupport or true;
|
||||||
};
|
};
|
||||||
|
|
||||||
saneBackendsSnapshot = callPackage ../misc/sane-backends/snapshot.nix {
|
saneBackendsSnapshot = callPackage ../misc/sane-backends/snapshot.nix {
|
||||||
gt68xxFirmware = getConfig ["sane" "gt68xxFirmware"] null;
|
gt68xxFirmware = config.sane.gt68xxFirmware or null;
|
||||||
};
|
};
|
||||||
|
|
||||||
saneFrontends = callPackage ../misc/sane-front { };
|
saneFrontends = callPackage ../misc/sane-front { };
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
# The actual Haskell packages are composed in haskell-packages.nix. There is
|
# The actual Haskell packages are composed in haskell-packages.nix. There is
|
||||||
# more documentation in there.
|
# more documentation in there.
|
||||||
|
|
||||||
{ makeOverridable, lowPrio, stdenv, pkgs, newScope, getConfig, callPackage } : rec {
|
{ makeOverridable, lowPrio, stdenv, pkgs, newScope, config, callPackage } : rec {
|
||||||
|
|
||||||
# Preferences functions.
|
# Preferences functions.
|
||||||
#
|
#
|
||||||
|
@ -123,13 +123,13 @@
|
||||||
# prefFun = self : super : self;
|
# prefFun = self : super : self;
|
||||||
enableLibraryProfiling =
|
enableLibraryProfiling =
|
||||||
if profExplicit then profDefault
|
if profExplicit then profDefault
|
||||||
else getConfig [ "cabal" "libraryProfiling" ] profDefault;
|
else config.cabal.libraryProfiling or profDefault;
|
||||||
ghc = callPackage ghcPath { ghc = ghcBinary; };
|
ghc = callPackage ghcPath { ghc = ghcBinary; };
|
||||||
});
|
});
|
||||||
|
|
||||||
defaultVersionPrioFun =
|
defaultVersionPrioFun =
|
||||||
profDefault :
|
profDefault :
|
||||||
if getConfig [ "cabal" "libraryProfiling" ] false == profDefault
|
if config.cabal.libraryProfiling or false == profDefault
|
||||||
then (x : x)
|
then (x : x)
|
||||||
else lowPrio;
|
else lowPrio;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue