diff options
author | Ismaël Bouya <ismael.bouya@normalesup.org> | 2018-12-13 21:25:24 +0100 |
---|---|---|
committer | Ismaël Bouya <ismael.bouya@normalesup.org> | 2019-05-24 01:40:13 +0200 |
commit | 24fd1fe6c62b7a9fc347794fde043285da272f5c (patch) | |
tree | 65557bf1d241ca389b619dbd24d18d51932ee030 /overlays/python-packages/default.nix | |
download | NUR-24fd1fe6c62b7a9fc347794fde043285da272f5c.tar.gz NUR-24fd1fe6c62b7a9fc347794fde043285da272f5c.tar.zst NUR-24fd1fe6c62b7a9fc347794fde043285da272f5c.zip |
Initial commit published for NUR
Diffstat (limited to 'overlays/python-packages/default.nix')
-rw-r--r-- | overlays/python-packages/default.nix | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/overlays/python-packages/default.nix b/overlays/python-packages/default.nix new file mode 100644 index 00000000..8a9949e6 --- /dev/null +++ b/overlays/python-packages/default.nix | |||
@@ -0,0 +1,28 @@ | |||
1 | let | ||
2 | fromMyPythonPackages = name: self: super: { | ||
3 | pythonOverrides = self.buildPythonOverrides (pyself: pysuper: { | ||
4 | "${name}" = self."${pyself.python.pname}PackagesPlus"."${name}"; | ||
5 | }) super.pythonOverrides; | ||
6 | }; | ||
7 | in | ||
8 | { | ||
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 | ||
13 | pyNames = [ "python3" "python36" "python37" ]; | ||
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"; | ||
28 | } | ||