]> git.immae.eu Git - perso/Immae/Config/Nix.git/blame - overlays/python-packages/default.nix
Remove discourse
[perso/Immae/Config/Nix.git] / overlays / python-packages / default.nix
CommitLineData
b798cf6d
IB
1let
2 fromMyPythonPackages = name: self: super: {
3 pythonOverrides = self.buildPythonOverrides (pyself: pysuper: {
4 "${name}" = self."${pyself.python.pname}PackagesPlus"."${name}";
5 }) super.pythonOverrides;
6 };
7in
c1b6f97a 8{
b798cf6d
IB
9 # https://github.com/NixOS/nixpkgs/issues/44426
10 # needs to come before all other in alphabetical order (or make use of
11 # lib.mkBefore)
12 __pythonOverlayFix = self: super: let
38ac9a57 13 pyNames = [ "python3" "python36" "python37" "python38" ];
b798cf6d
IB
14 overriddenPython = name: [
15 { inherit name; value = super.${name}.override { packageOverrides = self.pythonOverrides; }; }
16 { name = "${name}Packages"; value = self.recurseIntoAttrs self.${name}.pkgs; }
17 ];
18 overriddenPythons = builtins.concatLists (map overriddenPython pyNames);
19 in {
20 pythonOverrides = pyself: pysuper: {};
21 buildPythonOverrides = newOverrides: currentOverrides: super.lib.composeExtensions newOverrides currentOverrides;
22 } // super.lib.attrsets.listToAttrs overriddenPythons;
23
24
25 apprise = fromMyPythonPackages "apprise";
26 buildbot = import ./buildbot.nix;
27 wokkel = fromMyPythonPackages "wokkel";
45730653 28 pymilter = fromMyPythonPackages "pymilter";
c1b6f97a 29}