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 { lib
, python3Packages , buildPythonPackage
, setuptools
, setuptools-scm
, sqlalchemy
}: }:
python3Packages.buildPythonApplication {
buildPythonPackage {
pname = "libdib"; pname = "libdib";
version = "unstable"; version = "unstable";
src = lib.cleanSource ./.; src = lib.cleanSource ./.;
format = "pyproject"; format = "pyproject";
nativeBuildInputs = with python3Packages; [ nativeBuildInputs = [
setuptools setuptools
setuptools-scm setuptools-scm
]; ];
propagatedBuildInputs = with python3Packages; [
propagatedBuildInputs = [
sqlalchemy sqlalchemy
]; ];
} }

View File

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