Remove uses of __overrides feature

In addition to replacing use of a feature with IMO confusing semantics,
this will also let us cleanly separate out all-packages.nix into
category-specific files without changing the structure of the pkgs
attrset.

Signed-off-by: Shea Levy <shea@shealevy.com>
This commit is contained in:
Shea Levy 2013-12-30 11:04:45 -05:00
parent f529e91501
commit 4af1c79c06
4 changed files with 19 additions and 27 deletions

View File

@ -1,7 +1,5 @@
{ callPackage, self, stdenv, gettext, gvfs, libunique, overrides ? {} }:
{
__overrides = overrides;
let overridden = set // overrides; set = with overridden; {
# Backward compatibility.
gtkdoc = self.gtk_doc;
startupnotification = self.startup_notification;
@ -117,4 +115,4 @@
libglademm = callPackage ./bindings/libglademm { };
}
}; in overridden

View File

@ -129,19 +129,17 @@ let
# The package compositions. Yes, this isn't properly indented.
pkgsFun = pkgs: __overrides:
pkgsFun = pkgs: overrides:
with helperFunctions;
let defaultScope = pkgs // pkgs.xorg; in
helperFunctions // rec {
# `__overrides' is a magic attribute that causes the attributes in
# its value to be added to the surrounding `rec'. We'll remove this
# eventually.
inherit __overrides pkgs;
let defaultScope = pkgs // pkgs.xorg; self = self_ // overrides;
self_ = with self; helperFunctions // {
# Make some arguments passed to all-packages.nix available
inherit system stdenvType platform;
# Allow callPackage to fill in the pkgs argument
inherit pkgs;
# We use `callPackage' to be able to omit function arguments that
# can be obtained from `pkgs' or `pkgs.xorg' (i.e. `defaultScope').
@ -6033,7 +6031,7 @@ let
perlPackages = recurseIntoAttrs (import ./perl-packages.nix {
inherit pkgs;
__overrides = (config.perlPackageOverrides or (p: {})) pkgs;
overrides = (config.perlPackageOverrides or (p: {})) pkgs;
});
perl510Packages = import ./perl-packages.nix {
@ -6041,7 +6039,7 @@ let
perl = perl510;
buildPerlPackage = import ../development/perl-modules/generic perl510;
};
__overrides = (config.perl510PackageOverrides or (p: {})) pkgs;
overrides = (config.perl510PackageOverrides or (p: {})) pkgs;
};
perl514Packages = import ./perl-packages.nix {
@ -6049,7 +6047,7 @@ let
perl = perl514;
buildPerlPackage = import ../development/perl-modules/generic perl514;
};
__overrides = (config.perl514PackageOverrides or (p: {})) pkgs;
overrides = (config.perl514PackageOverrides or (p: {})) pkgs;
};
perlXMLParser = perlPackages.XMLParser;
@ -6177,7 +6175,7 @@ let
rPackages = recurseIntoAttrs (import ./r-packages.nix {
inherit pkgs;
__overrides = (config.rPackageOverrides or (p: {})) pkgs;
overrides = (config.rPackageOverrides or (p: {})) pkgs;
});
### SERVERS
@ -10469,4 +10467,4 @@ let
adobeReader = adobe-reader;
}; in pkgs
}; in self; in pkgs

View File

@ -5,16 +5,14 @@
for each package in a separate file: the call to the function would
be almost as must code as the function itself. */
{pkgs, __overrides}:
{pkgs, overrides}:
rec {
let self = _self // overrides; _self = with self; {
inherit (pkgs) buildPerlPackage fetchurl stdenv perl fetchsvn gnused;
inherit (stdenv.lib) maintainers;
inherit __overrides;
# Helper functions for packages that use Module::Build to build.
buildPerlModule = { buildInputs ? [], ... } @ args:
buildPerlPackage (args // {
@ -9369,4 +9367,4 @@ rec {
};
};
}
}; in self

View File

@ -1,15 +1,13 @@
/* This file defines the composition for CRAN (R) packages. */
{pkgs, __overrides}:
{pkgs, overrides}:
rec {
let self = _self // overrides; _self = with self; {
inherit (pkgs) buildRPackage fetchurl stdenv R;
inherit (stdenv.lib) maintainers;
inherit __overrides;
abind = buildRPackage rec {
name = "abind-1.4-0";
src = fetchurl {
@ -243,4 +241,4 @@ rec {
};
propagatedBuildInputs = [ DBI gsubfn proto chron RSQLite RSQLiteExtfuns ];
};
}
}; in self