Skip to content

Commit

Permalink
[Backport release-24.11] python3Packages.netbox-plugin-prometheus-sd:…
Browse files Browse the repository at this point in the history
… init at 1.1.1 (#361076)
  • Loading branch information
Aleksanaa authored Dec 8, 2024
2 parents 8ad4eac + 669cc83 commit 1b6d067
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
lib,
buildPythonPackage,
fetchFromGitHub,
poetry-core,
netbox,
}:

buildPythonPackage rec {
pname = "netbox-plugin-prometheus-sd";
version = "1.1.1";
pyproject = true;

src = fetchFromGitHub {
owner = "FlxPeters";
repo = "netbox-plugin-prometheus-sd";
rev = "v${version}";
hash = "sha256-UtvSkqs2PN3uxCB78hJjh0lZ1WbZGjDpwlKyeAGpiEM=";
};

nativeBuildInputs = [
poetry-core
];

nativeCheckInputs = [
netbox
];

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

pythonImportsCheck = [ "netbox_prometheus_sd" ];

meta = with lib; {
description = "Netbox plugin to provide Netbox entires to Prometheus HTTP service discovery";
homepage = "https://pypi.org/project/netbox-plugin-prometheus-sd/";
license = licenses.mit;
maintainers = with maintainers; [ xanderio ];
};
}
2 changes: 2 additions & 0 deletions pkgs/top-level/python-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9015,6 +9015,8 @@ self: super: with self; {

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

netbox-plugin-prometheus-sd = callPackage ../development/python-modules/netbox-plugin-prometheus-sd { };

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

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

0 comments on commit 1b6d067

Please sign in to comment.