diff --git a/pkgs/development/python-modules/nsapi/default.nix b/pkgs/development/python-modules/nsapi/default.nix new file mode 100644 index 000000000000..453eeb2c9519 --- /dev/null +++ b/pkgs/development/python-modules/nsapi/default.nix @@ -0,0 +1,37 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, future +, pythonOlder +, pytz +}: + +buildPythonPackage rec { + pname = "nsapi"; + version = "3.0.5"; + disabled = pythonOlder "3.7"; + + src = fetchFromGitHub { + owner = "aquatix"; + repo = "ns-api"; + rev = "v${version}"; + sha256 = "0i1zkvi4mrhkh1gxzpa54mq8mb76s9nf3jxxhpqia56nkq8f8krb"; + }; + + propagatedBuildInputs = [ + future + pytz + ]; + + # Project has no tests + doCheck = false; + + pythonImportsCheck = [ "ns_api" ]; + + meta = with lib; { + description = "Python module to query routes of the Dutch railways"; + homepage = "https://github.com/aquatix/ns-api/"; + license = with licenses; [ mit ]; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/servers/home-assistant/component-packages.nix b/pkgs/servers/home-assistant/component-packages.nix index fc23422e8964..02458dd2fe36 100644 --- a/pkgs/servers/home-assistant/component-packages.nix +++ b/pkgs/servers/home-assistant/component-packages.nix @@ -548,7 +548,7 @@ "namecheapdns" = ps: with ps; [ defusedxml ]; "nanoleaf" = ps: with ps; [ pynanoleaf ]; "neato" = ps: with ps; [ aiohttp-cors pybotvac ]; - "nederlandse_spoorwegen" = ps: with ps; [ ]; # missing inputs: nsapi + "nederlandse_spoorwegen" = ps: with ps; [ nsapi ]; "nello" = ps: with ps; [ ]; # missing inputs: pynello "ness_alarm" = ps: with ps; [ ]; # missing inputs: nessclient "nest" = ps: with ps; [ aiohttp-cors ha-ffmpeg python-nest ]; # missing inputs: google-nest-sdm diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 3229a266db6d..20e9481450be 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -4710,6 +4710,8 @@ in { npyscreen = callPackage ../development/python-modules/npyscreen { }; + nsapi = callPackage ../development/python-modules/nsapi { }; + ntc-templates = callPackage ../development/python-modules/ntc-templates { }; ntlm-auth = callPackage ../development/python-modules/ntlm-auth { };