2024-10-04 16:56:33 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
dnspython,
|
|
|
|
fetchFromGitHub,
|
|
|
|
fqdn,
|
|
|
|
idna,
|
|
|
|
natsort,
|
|
|
|
pytestCheckHook,
|
|
|
|
python-dateutil,
|
|
|
|
python3,
|
|
|
|
pythonOlder,
|
|
|
|
pyyaml,
|
|
|
|
runCommand,
|
|
|
|
setuptools,
|
2024-01-02 11:29:13 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "octodns";
|
2024-10-04 16:56:33 +00:00
|
|
|
version = "1.9.1";
|
2024-01-02 11:29:13 +00:00
|
|
|
pyproject = true;
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.8";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "octodns";
|
|
|
|
repo = "octodns";
|
2024-10-04 16:56:33 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
|
|
|
hash = "sha256-5EKa5G1rX/BRMMpGd861qTaACa2tBgNrKX52uJPV+N8=";
|
2024-01-02 11:29:13 +00:00
|
|
|
};
|
|
|
|
|
2024-10-04 16:56:33 +00:00
|
|
|
build-system = [
|
2024-01-02 11:29:13 +00:00
|
|
|
setuptools
|
|
|
|
];
|
|
|
|
|
2024-10-04 16:56:33 +00:00
|
|
|
dependencies = [
|
2024-01-02 11:29:13 +00:00
|
|
|
dnspython
|
|
|
|
fqdn
|
|
|
|
idna
|
|
|
|
natsort
|
|
|
|
python-dateutil
|
|
|
|
pyyaml
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeCheckInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "octodns" ];
|
|
|
|
|
2024-10-04 16:56:33 +00:00
|
|
|
passthru.withProviders =
|
|
|
|
ps:
|
|
|
|
let
|
|
|
|
pyEnv = python3.withPackages ps;
|
|
|
|
in
|
|
|
|
runCommand "octodns-with-providers" { } ''
|
|
|
|
mkdir -p $out/bin
|
|
|
|
ln -st $out/bin ${pyEnv}/bin/octodns-*
|
|
|
|
'';
|
2024-01-02 11:29:13 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Tools for managing DNS across multiple providers";
|
|
|
|
homepage = "https://github.com/octodns/octodns";
|
|
|
|
changelog = "https://github.com/octodns/octodns/blob/${src.rev}/CHANGELOG.md";
|
|
|
|
license = licenses.mit;
|
2024-10-04 16:56:33 +00:00
|
|
|
maintainers = [ maintainers.anthonyroussel ];
|
2024-01-02 11:29:13 +00:00
|
|
|
};
|
|
|
|
}
|