flake.nix: overlay package into pythonPackages

This commit is contained in:
2025-06-07 14:39:34 +02:00
parent 34f9e4823f
commit ca26131c22
2 changed files with 17 additions and 8 deletions

View File

@@ -1,18 +1,25 @@
{ lib
, python3Packages
, buildPythonPackage
, setuptools
, setuptools-scm
, sqlalchemy
}:
python3Packages.buildPythonApplication {
buildPythonPackage {
pname = "libdib";
version = "unstable";
src = lib.cleanSource ./.;
format = "pyproject";
nativeBuildInputs = with python3Packages; [
nativeBuildInputs = [
setuptools
setuptools-scm
];
propagatedBuildInputs = with python3Packages; [
propagatedBuildInputs = [
sqlalchemy
];
}

View File

@@ -19,15 +19,17 @@
in {
packages = forAllSystems (system: pkgs: {
default = self.packages.${system}.libdib;
libdib = pkgs.callPackage ./default.nix {
python3Packages = pkgs.python313Packages;
};
libdib = pkgs.python3Packages.callPackage ./default.nix { };
});
overlays = {
default = self.overlays.libdib;
libdib = final: prev: {
inherit (self.packages.${prev.system}) libdib;
pythonPackagesExtensions = prev.pythonPackagesExtensions ++ [
(python-final: python-prev: {
libdib = python-final.callPackage ./default.nix { };
})
];
};
};