pythonPackages: Implement overlay infrastructure

Accumulate overlays in pythonOverrides attribute and then apply
them just once to base python packages.

https://github.com/NixOS/nixpkgs/issues/44426
This commit is contained in:
Tyson Whitehead
2018-08-10 00:24:19 -04:00
parent 444bcbe26f
commit 8f5981df31
4 changed files with 15 additions and 0 deletions

View File

@@ -35,6 +35,8 @@ self: super: pkgs: with pkgs; {
ovito = libsForQt5.callPackage ./ovito.nix { stdenv = overrideCC stdenv gcc6; };
pythonOverrides = lib.composeExtensions super.pythonOverrides (import ./python-packages.nix pkgs);
#sumo = callPackage ./sumo.nix { fox = fox_1_6; };
namd = callPackage ./namd.nix { };

3
pkgs/python-packages.nix Normal file
View File

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

View File

@@ -7,4 +7,11 @@
self: super: pkgs: with pkgs; {
# https://github.com/NixOS/nixpkgs/issues/44426
python27 = super.python27.override { packageOverrides = pythonOverrides; };
python34 = super.python34.override { packageOverrides = pythonOverrides; };
python35 = super.python35.override { packageOverrides = pythonOverrides; };
python36 = super.python36.override { packageOverrides = pythonOverrides; };
pythonOverrides = import ./python-packages.nix pkgs;
}

View File

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