use upstreamed python packages

Signed-off-by: Kiara Grouwstra <kiara@procolix.eu>
This commit is contained in:
Kiara Grouwstra 2025-10-11 14:14:40 +02:00
parent a2a4977139
commit 80e67835ca
Signed by: kiara
SSH key fingerprint: SHA256:COspvLoLJ5WC5rFb9ZDe5urVCkK4LJZOsjfF4duRJFU
4 changed files with 26 additions and 85 deletions

View file

@ -1,9 +1,12 @@
/**
Nixpkgs overlay adding extra packages needed for the application
*/
{
sources ? import ../../npins,
}:
_: prev:
let
extraPython3Packages = prev.callPackage ./python-packages { };
extraPython3Packages = prev.callPackage ./python-packages { inherit sources; };
in
{

View file

@ -13,7 +13,10 @@
}
```
*/
{ pkgs }:
{
pkgs,
sources ? import ../../../npins,
}:
let
callPackage = pkgs.lib.callPackageWith (pkgs // pkgs.python3.pkgs // extraPython3Packages);
@ -22,11 +25,24 @@ let
dir = toString ./.;
in
with builtins;
listToAttrs (
map (name: {
inherit name;
value = callPackage (dir + "/${name}") { };
}) (attrNames (readDir dir))
(
{
django-pydantic-field =
pkgs.callPackage
"${sources.nixpkgs-unstable}/pkgs/development/python-modules/django-pydantic-field/default.nix"
{ };
drf-pydantic =
pkgs.callPackage
"${sources.nixpkgs-unstable}/pkgs/development/python-modules/drf-pydantic/default.nix"
{ };
}
# will read further packages from sub-dirs here
// listToAttrs (
map (name: {
inherit name;
value = callPackage (dir + "/${name}") { };
}) (attrNames (readDir dir))
)
);
in
extraPython3Packages

View file

@ -1,36 +0,0 @@
{
lib,
buildPythonPackage,
fetchFromGitHub,
django,
pydantic,
setuptools,
}:
buildPythonPackage rec {
_class = "package";
pname = "django-pydantic-field";
version = "v0.3.12";
pyproject = true;
src = fetchFromGitHub {
owner = "surenkov";
repo = pname;
rev = version;
hash = "sha256-rlnS67OGljWD8Sbyutb43txAH0jA2+8ju1ntSEP3whM=";
};
nativeBuildInputs = [ setuptools ];
propagatedBuildInputs = [
django
pydantic
];
meta = with lib; {
description = "";
homepage = "https://github.com/${src.owner}/${pname}";
license = licenses.mit;
};
}

View file

@ -1,42 +0,0 @@
{
lib,
buildPythonPackage,
fetchFromGitHub,
setuptools,
django,
pydantic,
hatchling,
djangorestframework,
}:
buildPythonPackage rec {
_class = "package";
pname = "drf-pydantic";
version = "v2.9.0";
pyproject = true;
src = fetchFromGitHub {
owner = "KiaraGrouwstra";
repo = pname;
rev = "d21c879543bd106242bd7f86e79da1f668109579";
hash = "sha256-pk0/6BphIiXxR3cewBJ5nKii3kj3lDHLO9U9xqXDxI8=";
};
nativeBuildInputs = [
setuptools
hatchling
];
propagatedBuildInputs = [
django
pydantic
djangorestframework
];
meta = with lib; {
description = "";
homepage = "https://github.com/${src.owner}/${pname}";
license = licenses.mit;
};
}