diff --git a/default.nix b/default.nix index 12bc932..9cb4d12 100644 --- a/default.nix +++ b/default.nix @@ -1,5 +1,4 @@ -{ pkgs, lib ? pkgs.lib }: with lib; -mapAttrs' (name: _: { - value = pkgs.python3.pkgs.callPackage (./python-pkgs/${name}) { }; - name = removeSuffix ".nix" name; -}) (builtins.readDir ./python-pkgs) +{ + pkgs ? (import { }), +}: +import pkgs.path { overlays = pkgs.overlays ++ [ (import ./overlay.nix) ]; } diff --git a/overlay.nix b/overlay.nix new file mode 100644 index 0000000..a91af86 --- /dev/null +++ b/overlay.nix @@ -0,0 +1,6 @@ +final: prev: with prev.lib; { + python3 = prev.python3.override { + packageOverrides = import ./python_overlay.nix; + }; + python3Packages = final.python3.pkgs; +} diff --git a/python_overlay.nix b/python_overlay.nix new file mode 100644 index 0000000..3dc4b4f --- /dev/null +++ b/python_overlay.nix @@ -0,0 +1,6 @@ +final: prev: +with prev.lib; +mapAttrs' (name: _: { + value = final.callPackage (./python-pkgs/${name}) { }; + name = removeSuffix ".nix" name; +}) (builtins.readDir ./python-pkgs)