Files
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

48 lines
1.2 KiB
Nix

{
lib,
buildPythonPackage,
fetchPypi,
packaging,
pan-python,
poetry-core,
}:
buildPythonPackage rec {
pname = "pan-os-python";
version = "1.12.3";
pyproject = true;
src = fetchPypi {
pname = "pan_os_python";
inherit version;
hash = "sha256-b3jHu//GX031UbApDzYjCUXpI5MOdHwk9mXVymsFttk=";
};
postPatch = ''
# Modernize project definition
substituteInPlace pyproject.toml \
--replace-fail 'poetry.masonry.api' 'poetry.core.masonry.api' \
--replace-fail 'poetry>=0.12' 'poetry-core' \
--replace-fail 'pan-python = "^0.17.0"' 'pan-python = "^0.25.0"'
substituteInPlace panos/__init__.py \
--replace-fail "from distutils.version import LooseVersion" "from packaging.version import Version as LooseVersion"
'';
dependencies = [
packaging
pan-python
];
build-system = [ poetry-core ];
pythonImportsCheck = [ "panos" ];
meta = {
description = "Palo Alto Networks PAN-OS SDK for Python";
homepage = "https://github.com/PaloAltoNetworks/pan-os-python";
changelog = "https://github.com/PaloAltoNetworks/pan-os-python/releases/tag/v${version}";
license = lib.licenses.isc;
maintainers = with lib.maintainers; [ jherland ];
};
}