rPackages: Implement overlay infrastructure

This commit is contained in:
Tyson Whitehead
2018-11-28 21:58:11 -05:00
parent 7f6c635426
commit 5e1a6acb68
5 changed files with 24 additions and 0 deletions

View File

@@ -36,6 +36,8 @@ self: super: pkgs: with pkgs; {
pythonOverrides = lib.composeExtensions super.pythonOverrides (import ./python-packages.nix pkgs);
rOverrides = lib.composeExtensions super.rOverrides (import ./r-modules.nix pkgs);
#sumo = callPackage ./sumo.nix { fox = fox_1_6; };
namd = callPackage ./namd.nix { };

3
pkgs/r-modules.nix Normal file
View File

@@ -0,0 +1,3 @@
pkgs: self: super: with self; {
}

View File

@@ -110,9 +110,11 @@ in let
# Provided overlays
pkgsNamesTopLevel = let self = import ./pkgs/all-packages.nix self { } self; in self;
pkgsNamesPython = let self = import ./pkgs/python-packages.nix { } self { } ; in self;
pkgsNamesR = let self = import ./pkgs/r-modules.nix { } self { } ; in self;
temporaryNamesTopLevel = let self = import ./temporary/all-packages.nix self { } self; in self;
temporaryNamesPython = let self = import ./temporary/python-packages.nix { } self { } ; in self;
temporaryNamesR = let self = import ./temporary/r-modules.nix { } self { } ; in self;
in {
# Tweak the nixos make-channel code to include the upstream channel.
@@ -150,6 +152,7 @@ in let
pkgs = extractDerivations pkgs pkgsNamesTopLevel // {
python2Packages = extractDerivations pkgs.python2Packages pkgsNamesPython;
python3Packages = extractDerivations pkgs.python3Packages pkgsNamesPython;
rPackages = extractDerivations pkgs.rPackages pkgsNamesR;
};
@@ -158,6 +161,7 @@ in let
temporary = extractDerivations pkgs temporaryNamesTopLevel // {
python2Packages = extractDerivations pkgs.python2Packages temporaryNamesPython;
python3Packages = extractDerivations pkgs.python3Packages temporaryNamesPython;
rPackages = extractDerivations pkgs.rPackages temporaryNamesR;
};
};

View File

@@ -18,4 +18,16 @@ self: super: pkgs: with pkgs; {
python36 = super.python36.override { packageOverrides = pythonOverrides; };
pythonOverrides = import ./python-packages.nix pkgs;
# same for R as Python (except we have to do the self/super plumbing)
rPackages = super.rPackages.override {
overrides =
let
overrides = rOverrides self super.rPackages;
self = super.rPackages // overrides;
in
overrides;
};
rOverrides = import ./r-modules.nix pkgs;
}

3
temporary/r-modules.nix Normal file
View File

@@ -0,0 +1,3 @@
pkgs: self: super: with self; {
}