diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2012-09-19 13:56:56 -0400 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2012-09-19 13:56:56 -0400 |
commit | e6077fbc46561fbe85c40a43b2b0e86e939f984f (patch) | |
tree | 038bfd2b546561425c96deccd7d856f96297ea02 /pkgs/development/interpreters | |
parent | 0062d0f11d163ca720134f8d5a18bc1696eab1ae (diff) | |
download | nixlib-e6077fbc46561fbe85c40a43b2b0e86e939f984f.tar nixlib-e6077fbc46561fbe85c40a43b2b0e86e939f984f.tar.gz nixlib-e6077fbc46561fbe85c40a43b2b0e86e939f984f.tar.bz2 nixlib-e6077fbc46561fbe85c40a43b2b0e86e939f984f.tar.lz nixlib-e6077fbc46561fbe85c40a43b2b0e86e939f984f.tar.xz nixlib-e6077fbc46561fbe85c40a43b2b0e86e939f984f.tar.zst nixlib-e6077fbc46561fbe85c40a43b2b0e86e939f984f.zip |
Remove getConfig helper function
An expression like ‘getConfig [ "cabal" "libraryProfiling" ] false’ can be written more concisely as ‘config.cabal.libraryProfiling or false’.
Diffstat (limited to 'pkgs/development/interpreters')
-rw-r--r-- | pkgs/development/interpreters/octave/hg.nix | 8 | ||||
-rw-r--r-- | pkgs/development/interpreters/php/5.2.nix | 34 | ||||
-rw-r--r-- | pkgs/development/interpreters/php/5.3.nix | 34 | ||||
-rw-r--r-- | pkgs/development/interpreters/ruby/libs.nix | 4 |
4 files changed, 40 insertions, 40 deletions
diff --git a/pkgs/development/interpreters/octave/hg.nix b/pkgs/development/interpreters/octave/hg.nix index a908ddc0fc88..f414dd719654 100644 --- a/pkgs/development/interpreters/octave/hg.nix +++ b/pkgs/development/interpreters/octave/hg.nix @@ -1,5 +1,5 @@ {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 @@ -12,7 +12,7 @@ stdenv.mkDerivation ({ license = "GPL-3"; }; } // ( - if (getConfig ["octave" "devVersion"] false) then { + if (config.octave.devVersion or false) then { name = "octave-hg"; # developement version mercurial repo # REGION AUTO UPDATE: { name="octave"; type = "hg"; url = "http://www.octave.org/hg/octave"; } src = sourceFromHead "octave-03b414516dd8.tar.gz" @@ -27,7 +27,7 @@ stdenv.mkDerivation ({ export HOME=$TMP ''; 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 # from the buildfile buildPhase = '' @@ -44,6 +44,6 @@ stdenv.mkDerivation ({ sha256 = "1lm4v85kdic4n5yxwzrdb0v6dc6nw06ljgx1q8hfkmi146kpg7s6"; }; buildInputs = commonBuildInputs ++ [ flex bison autoconf automake python ] - ++ lib.optionals (getConfig ["octave" "atlas"] true) [ python atlas ]; + ++ lib.optionals (config.octave.atlas or true) [ python atlas ]; } )) diff --git a/pkgs/development/interpreters/php/5.2.nix b/pkgs/development/interpreters/php/5.2.nix index f98d178663f1..4395c0f498c9 100644 --- a/pkgs/development/interpreters/php/5.2.nix +++ b/pkgs/development/interpreters/php/5.2.nix @@ -121,23 +121,23 @@ composableDerivation {} ( fixed : let inherit (fixed.fixed) version; in { }; cfg = { - mysqlSupport = getConfig ["php" "mysql"] true; - mysqliSupport = getConfig ["php" "mysqli"] true; - pdo_mysqlSupport = getConfig ["php" "pdo_mysql"] true; - libxml2Support = getConfig ["php" "libxml2"] true; - apxs2Support = getConfig ["php" "apxs2"] true; - bcmathSupport = getConfig ["php" "bcmath"] true; - socketsSupport = getConfig ["php" "sockets"] true; - curlSupport = getConfig ["php" "curl"] true; - gettextSupport = getConfig ["php" "gettext"] true; - postgresqlSupport = getConfig ["php" "postgresql"] true; - readlineSupport = getConfig ["php" "readline"] true; - sqliteSupport = getConfig ["php" "sqlite"] true; - soapSupport = getConfig ["php" "soap"] true; - zlibSupport = getConfig ["php" "zlib"] true; - opensslSupport = getConfig ["php" "openssl"] true; - mbstringSupport = getConfig ["php" "mbstring"] true; - gdSupport = getConfig ["php" "gd"] true; + mysqlSupport = config.php.mysql or true; + mysqliSupport = config.php.mysqli or true; + pdo_mysqlSupport = config.php.pdo_mysql or true; + libxml2Support = config.php.libxml2 or true; + apxs2Support = config.php.apxs2 or true; + bcmathSupport = config.php.bcmath or true; + socketsSupport = config.php.sockets or true; + curlSupport = config.php.curl or true; + gettextSupport = config.php.gettext or true; + postgresqlSupport = config.php.postgresql or true; + readlineSupport = config.php.readline or true; + sqliteSupport = config.php.sqlite or true; + soapSupport = config.php.soap or true; + zlibSupport = config.php.zlib or true; + opensslSupport = config.php.openssl or true; + mbstringSupport = config.php.mbstring or true; + gdSupport = config.php.gd or true; }; configurePhase = '' diff --git a/pkgs/development/interpreters/php/5.3.nix b/pkgs/development/interpreters/php/5.3.nix index b4f00ab1f7d4..d4aebc77637b 100644 --- a/pkgs/development/interpreters/php/5.3.nix +++ b/pkgs/development/interpreters/php/5.3.nix @@ -121,23 +121,23 @@ composableDerivation {} ( fixed : let inherit (fixed.fixed) version; in { }; cfg = { - mysqlSupport = getConfig ["php" "mysql"] true; - mysqliSupport = getConfig ["php" "mysqli"] true; - pdo_mysqlSupport = getConfig ["php" "pdo_mysql"] true; - libxml2Support = getConfig ["php" "libxml2"] true; - apxs2Support = getConfig ["php" "apxs2"] true; - bcmathSupport = getConfig ["php" "bcmath"] true; - socketsSupport = getConfig ["php" "sockets"] true; - curlSupport = getConfig ["php" "curl"] true; - gettextSupport = getConfig ["php" "gettext"] true; - postgresqlSupport = getConfig ["php" "postgresql"] true; - readlineSupport = getConfig ["php" "readline"] true; - sqliteSupport = getConfig ["php" "sqlite"] true; - soapSupport = getConfig ["php" "soap"] true; - zlibSupport = getConfig ["php" "zlib"] true; - opensslSupport = getConfig ["php" "openssl"] true; - mbstringSupport = getConfig ["php" "mbstring"] true; - gdSupport = getConfig ["php" "gd"] true; + mysqlSupport = config.php.mysql or true; + mysqliSupport = config.php.mysqli or true; + pdo_mysqlSupport = config.php.pdo_mysql or true; + libxml2Support = config.php.libxml2 or true; + apxs2Support = config.php.apxs2 or true; + bcmathSupport = config.php.bcmath or true; + socketsSupport = config.php.sockets or true; + curlSupport = config.php.curl or true; + gettextSupport = config.php.gettext or true; + postgresqlSupport = config.php.postgresql or true; + readlineSupport = config.php.readline or true; + sqliteSupport = config.php.sqlite or true; + soapSupport = config.php.soap or true; + zlibSupport = config.php.zlib or true; + opensslSupport = config.php.openssl or true; + mbstringSupport = config.php.mbstring or true; + gdSupport = config.php.gd or true; }; configurePhase = '' diff --git a/pkgs/development/interpreters/ruby/libs.nix b/pkgs/development/interpreters/ruby/libs.nix index 9aa9203f10f6..1b4b7aec2b1c 100644 --- a/pkgs/development/interpreters/ruby/libs.nix +++ b/pkgs/development/interpreters/ruby/libs.nix @@ -1,4 +1,4 @@ -{stdenv, getConfig, fetchurl, callPackage}: +{ stdenv, config, fetchurl, callPackage }: let inherit (stdenv.lib) fold optional; @@ -36,7 +36,7 @@ in if builtins.pathExists file then import (builtins.toPath file) else null; in - getConfig [ "gems" name ] fallback; + stdenv.lib.attrByPath [ "gems" name ] fallback config; in { generated = getLocalGemFun "generated"; |