Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 poetry-core, 6 netbox, 7}: 8 9buildPythonPackage rec { 10 pname = "netbox-plugin-prometheus-sd"; 11 version = "1.1.1"; 12 pyproject = true; 13 14 src = fetchFromGitHub { 15 owner = "FlxPeters"; 16 repo = "netbox-plugin-prometheus-sd"; 17 rev = "v${version}"; 18 hash = "sha256-UtvSkqs2PN3uxCB78hJjh0lZ1WbZGjDpwlKyeAGpiEM="; 19 }; 20 21 nativeBuildInputs = [ 22 poetry-core 23 ]; 24 25 nativeCheckInputs = [ 26 netbox 27 ]; 28 29 preFixup = '' 30 export PYTHONPATH=${netbox}/opt/netbox/netbox:$PYTHONPATH 31 ''; 32 33 pythonImportsCheck = [ "netbox_prometheus_sd" ]; 34 35 meta = with lib; { 36 description = "Netbox plugin to provide Netbox entires to Prometheus HTTP service discovery"; 37 homepage = "https://pypi.org/project/netbox-plugin-prometheus-sd/"; 38 license = licenses.mit; 39 maintainers = with maintainers; [ xanderio ]; 40 }; 41}