Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

python311Packages.netbox-documents: init at 0.7.0; python311Packages.drf-extra-fields: init at 3.7.0 #312866

Merged
merged 2 commits into from
Oct 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 ];

felbinger marked this conversation as resolved.
Show resolved Hide resolved
dependencies = [
django
djangorestframework
filetype
];

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

nativeCheckInputs = [
(django.override { withGdal = true; })
psycopg2
pytestCheckHook
pytest-django
SuperSandro2000 marked this conversation as resolved.
Show resolved Hide resolved
] ++ optional-dependencies.Base64ImageField;

felbinger marked this conversation as resolved.
Show resolved Hide resolved
pythonImportsCheck = [ "drf_extra_fields" ];

meta = {
description = "Extra Fields for Django Rest Framework";
homepage = "https://github.com/Hipo/drf-extra-fields";
felbinger marked this conversation as resolved.
Show resolved Hide resolved
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 @@ -3724,6 +3724,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 @@ -8845,6 +8847,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