feat(overlay): with overlay

This commit is contained in:
catvayor 2024-10-25 18:09:45 +02:00
parent c393361e83
commit 3fa96d61b0
Signed by: lbailly
GPG key ID: CE3E645251AC63F3
3 changed files with 16 additions and 5 deletions

View file

@ -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 <nixpkgs> { }),
}:
import pkgs.path { overlays = pkgs.overlays ++ [ (import ./overlay.nix) ]; }

6
overlay.nix Normal file
View file

@ -0,0 +1,6 @@
final: prev: with prev.lib; {
python3 = prev.python3.override {
packageOverrides = import ./python_overlay.nix;
};
python3Packages = final.python3.pkgs;
}

6
python_overlay.nix Normal file
View file

@ -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)