nixpkgs/pkgs/applications/networking/cloudflare-dyndns/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

61 lines
1.3 KiB
Nix
Raw Normal View History

{ lib
, python3
2022-05-01 21:57:44 +00:00
, fetchFromGitHub
, fetchpatch
2022-05-01 21:57:44 +00:00
}:
python3.pkgs.buildPythonApplication rec {
2022-05-01 21:57:44 +00:00
pname = "cloudflare-dyndns";
version = "4.1";
format = "pyproject";
2022-05-01 21:57:44 +00:00
src = fetchFromGitHub {
owner = "kissgyorgy";
repo = pname;
rev = "v${version}";
hash = "sha256-6Q5fpJ+HuQ+hc3xTtB5tR43pn9WZ0nZZR723iLAkpis=";
};
nativeBuildInputs = with python3.pkgs; [
poetry-core
];
2022-05-01 21:57:44 +00:00
propagatedBuildInputs = with python3.pkgs; [
2022-05-01 21:57:44 +00:00
attrs
click
cloudflare
pydantic
requests
];
checkInputs = with python3.pkgs; [
pytestCheckHook
];
patches = [
# Switch to poetry-core, https://github.com/kissgyorgy/cloudflare-dyndns/pull/22
(fetchpatch {
name = "switch-to-poetry-core.patch";
url = "https://github.com/kissgyorgy/cloudflare-dyndns/commit/741ed1ccb3373071ce15683a3b8ddc78d64866f8.patch";
sha256 = "sha256-mjSah0DWptZB6cjhP6dJg10BpJylPSQ2K4TKda7VmHw=";
})
];
2022-05-01 21:57:44 +00:00
postPatch = ''
substituteInPlace pyproject.toml \
--replace 'click = "^7.0"' 'click = "*"' \
--replace 'attrs = "^21.1.0"' 'attrs = "*"'
2022-05-01 21:57:44 +00:00
'';
disabledTests = [
"test_get_ipv4"
];
meta = with lib; {
description = "CloudFlare Dynamic DNS client";
2022-05-01 21:57:44 +00:00
homepage = "https://github.com/kissgyorgy/cloudflare-dyndns";
license = licenses.mit;
maintainers = with maintainers; [ lovesegfault ];
};
}