Skip to content

Commit

Permalink
python311Packages.netbox-documents: init at 0.7.0; python311Packages…
Browse files Browse the repository at this point in the history
….drf-extra-fields: init at 3.7.0 (#312866)
  • Loading branch information
SuperSandro2000 authored Oct 10, 2024
2 parents 6c843e1 + 7f233a7 commit 579b471
Show file tree
Hide file tree
Showing 3 changed files with 102 additions and 0 deletions.
55 changes: 55 additions & 0 deletions pkgs/development/python-modules/drf-extra-fields/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
{
lib,
buildPythonPackage,
fetchFromGitHub,
setuptools,
django,
djangorestframework,
filetype,
pillow,
psycopg2,
pytestCheckHook,
pytest-django,
}:

buildPythonPackage rec {
pname = "drf-extra-fields";
version = "3.7.0";
pyproject = true;

src = fetchFromGitHub {
owner = "hipo";
repo = "drf-extra-fields";
rev = "v${version}";
hash = "sha256-Ym4vnZ/t0ZdSxU53BC0ducJl1YiTygRSWql/35PNbOU";
};

build-system = [ setuptools ];

dependencies = [
django
djangorestframework
filetype
];

optional-dependencies = {
Base64ImageField = [ pillow ];
};

nativeCheckInputs = [
(django.override { withGdal = true; })
psycopg2
pytestCheckHook
pytest-django
] ++ optional-dependencies.Base64ImageField;

pythonImportsCheck = [ "drf_extra_fields" ];

meta = {
description = "Extra Fields for Django Rest Framework";
homepage = "https://github.com/Hipo/drf-extra-fields";
changelog = "https://github.com/Hipo/drf-extra-fields/releases/tag/${src.rev}";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ felbinger ];
};
}
43 changes: 43 additions & 0 deletions pkgs/development/python-modules/netbox-documents/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
lib,
buildPythonPackage,
fetchFromGitHub,
setuptools,
drf-extra-fields,
python,
netbox,
}:

buildPythonPackage rec {
pname = "netbox-documents";
version = "0.7.0";
pyproject = true;

src = fetchFromGitHub {
owner = "jasonyates";
repo = "netbox-documents";
rev = "v${version}";
hash = "sha256-Uijdaicbx9A9fBgFx3zyhhFlokFdb9TSolnExbfkkc4=";
};

build-system = [ setuptools ];

dependencies = [ drf-extra-fields ];

nativeCheckInputs = [ netbox ];

preFixup = ''
export PYTHONPATH=${netbox}/opt/netbox/netbox:$PYTHONPATH
'';

dontUsePythonImportsCheck = python.pythonVersion != netbox.python.pythonVersion;
pythonImportsCheck = [ "netbox_documents" ];

meta = {
description = "Plugin designed to faciliate the storage of site, circuit, device type and device specific documents within NetBox";
homepage = "https://github.com/jasonyates/netbox-documents";
changelog = "https://github.com/jasonyates/netbox-documents/releases/tag/${src.rev}";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ felbinger ];
};
}
4 changes: 4 additions & 0 deletions pkgs/top-level/python-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3734,6 +3734,8 @@ self: super: with self; {

dremel3dpy = callPackage ../development/python-modules/dremel3dpy { };

drf-extra-fields = callPackage ../development/python-modules/drf-extra-fields { };

drf-jwt = callPackage ../development/python-modules/drf-jwt { };

drf-nested-routers = callPackage ../development/python-modules/drf-nested-routers { };
Expand Down Expand Up @@ -8859,6 +8861,8 @@ self: super: with self; {

netapp-ontap = callPackage ../development/python-modules/netapp-ontap { };

netbox-documents = callPackage ../development/python-modules/netbox-documents { };

netbox-reorder-rack = callPackage ../development/python-modules/netbox-reorder-rack { };

netcdf4 = callPackage ../development/python-modules/netcdf4 { };
Expand Down

0 comments on commit 579b471

Please sign in to comment.