feat(overlay): with overlay

This commit is contained in:
catvayor 2024-10-25 18:09:45 +02:00
parent c393361e83
commit 5b975b9895
Signed by: lbailly
GPG key ID: CE3E645251AC63F3
3 changed files with 13 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) ]; }

3
overlay.nix Normal file
View file

@ -0,0 +1,3 @@
final: prev: with prev.lib; {
pythonPackagesExtensions = prev.pythonPackagesExtensions ++ [ (import ./python_overlay.nix) ];
}

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)