diff --git a/modules/flake/overlays.nix b/modules/flake/overlays.nix index 57004b16..5a3644cd 100644 --- a/modules/flake/overlays.nix +++ b/modules/flake/overlays.nix @@ -33,6 +33,7 @@ h-move-repo = final.writers.writeBashBin "h-move-repo" { } ../../scripts/h-move-repo.sh; win10fonts = final.callPackage ../../packages/win10fonts { }; attic-client = final.callPackage ../../packages/attic { clientOnly = true; }; + edge-tts = final.callPackage ../../packages/edge-tts { }; # wkhtmltopdf-qt4 = final.callPackage ./wkhtmltopdf-qt4 { }; # xorgxrdp = final.callPackage ./xrdp/xorgxrdp.nix { }; # xrdp = final.callPackage ./xrdp { }; diff --git a/modules/flake/packages.nix b/modules/flake/packages.nix index 54c00bb7..241f3917 100644 --- a/modules/flake/packages.nix +++ b/modules/flake/packages.nix @@ -3,6 +3,7 @@ _: { packages = { inherit (pkgs) aider + edge-tts prom-checktlsa; }; }; diff --git a/modules/home/packages.nix b/modules/home/packages.nix index 8323a127..10f26d0c 100644 --- a/modules/home/packages.nix +++ b/modules/home/packages.nix @@ -39,6 +39,8 @@ in nurl gnumake hl + edge-tts + nix-update go # nixd nodejs_latest diff --git a/packages/edge-tts/default.nix b/packages/edge-tts/default.nix new file mode 100644 index 00000000..af4ee4be --- /dev/null +++ b/packages/edge-tts/default.nix @@ -0,0 +1,37 @@ +{ lib +, python3 +, fetchFromGitHub +}: + +python3.pkgs.buildPythonApplication rec { + pname = "edge-tts"; + version = "6.1.12"; + pyproject = true; + + src = fetchFromGitHub { + owner = "rany2"; + repo = "edge-tts"; + rev = "dfd4cab849a988d9587684cf3f9f9536c92b8f4d"; + hash = "sha256-/ECNgsVtR2S5METj5ck7cM9jS9igiBH4GUxMvhWRINU="; + }; + + nativeBuildInputs = [ + python3.pkgs.setuptools + python3.pkgs.wheel + ]; + + propagatedBuildInputs = [ + python3.pkgs.certifi + python3.pkgs.aiohttp + ]; + + pythonImportsCheck = [ "edge_tts" ]; + + meta = with lib; { + description = "Use Microsoft Edge's online text-to-speech service from Python WITHOUT needing Microsoft Edge or Windows or an API key"; + homepage = "https://github.com/rany2/edge-tts"; + license = licenses.gpl3Only; + maintainers = with maintainers; [ ]; + mainProgram = "edge-tts"; + }; +}