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:
Eelco Dolstra
2012-09-19 13:56:56 -04:00
parent 0062d0f11d
commit e6077fbc46
11 changed files with 203 additions and 207 deletions
+4 -3
View File
@@ -1,11 +1,12 @@
{ stdenv, getConfig, fetchurl, libX11, libXext, libXinerama, libXrandr
{ stdenv, config, fetchurl, libX11, libXext, libXinerama, libXrandr
, libXrender, fontconfig, freetype, openal }:
stdenv.mkDerivation {
name = "oilrush";
src =
let
url = getConfig [ "oilrush" "url" ] null;
sha256 = getConfig [ "oilrush" "sha256" ] null;
url = config.oilrush.url or null;
sha256 = config.oilrush.sha256 or null;
in
assert url != null && sha256 != null;
fetchurl { inherit url sha256; };