Loading nixos/modules/services/desktop-managers/pantheon.nix +0 −1 Original line number Diff line number Diff line Loading @@ -173,7 +173,6 @@ in services.upower.enable = config.powerManagement.enable; services.libinput.enable = mkDefault true; services.switcherooControl.enable = mkDefault true; services.xserver.updateDbusEnvironment = true; services.zeitgeist.enable = mkDefault true; services.geoclue2.enable = mkDefault true; # pantheon has pantheon-agent-geoclue2 Loading nixos/modules/services/home-automation/wyoming/piper.nix +13 −0 Original line number Diff line number Diff line Loading @@ -10,6 +10,7 @@ let cfg = config.services.wyoming.piper; inherit (lib) literalExpression mkOption mkEnableOption mkPackageOption Loading Loading @@ -100,6 +101,15 @@ in default = true; }; useCUDA = mkOption { type = bool; default = config.cudaSupport; defaultText = literalExpression "config.cudaSupport"; description = '' Whether to accelerate the underlying onnxruntime library with CUDA. ''; }; extraArgs = mkOption { type = listOf str; default = [ ]; Loading Loading @@ -165,6 +175,9 @@ in ++ lib.optionals options.streaming [ "--streaming" ] ++ lib.optionals options.cuda [ "--use-cuda" ] ++ options.extraArgs ); CapabilityBoundingSet = ""; Loading nixos/modules/services/web-apps/invoiceplane.nix +5 −0 Original line number Diff line number Diff line Loading @@ -16,6 +16,8 @@ let invoiceplane-config = hostName: cfg: pkgs.writeText "ipconfig.php" '' # <?php exit('No direct script access allowed'); ?> IP_URL=http://${hostName} ENABLE_DEBUG=false DISABLE_SETUP=false Loading Loading @@ -353,6 +355,9 @@ in if ! grep -q IP_URL "${cfg.stateDir}/ipconfig.php"; then cp "${invoiceplane-config hostName cfg}" "${cfg.stateDir}/ipconfig.php" fi if ! grep -q 'php exit' "${cfg.stateDir}/ipconfig.php"; then sed -i "1i # <?php exit('No direct script access allowed'); ?>" "${cfg.stateDir}/ipconfig.php" fi '') eachSite ); wantedBy = [ "multi-user.target" ]; Loading pkgs/applications/audio/espeak-ng/default.nix +74 −43 Original line number Diff line number Diff line Loading @@ -3,40 +3,78 @@ lib, fetchFromGitHub, fetchpatch, replaceVars, # build system autoconf, automake, which, cmake, libtool, makeWrapper, ninja, pkg-config, ronn, replaceVars, buildPackages, mbrolaSupport ? true, which, # dependencies alsa-plugins, asyncSupport ? true, klattSupport ? true, mbrola, pcaudiolibSupport ? true, mbrolaSupport ? true, pcaudiolib, sonicSupport ? true, pcaudiolibSupport ? true, sonic, alsa-plugins, makeWrapper, sonicSupport ? true, speechPlayerSupport ? true, ucdSupport ? false, }: let version = "1.52.0"; src = fetchFromGitHub { owner = "espeak-ng"; repo = "espeak-ng"; tag = version; hash = "sha256-mmh5QPSVD5YQ0j16R+bEL5vcyWLtTNOJ/irBNzWY3ro="; }; ucd-tools = stdenv.mkDerivation { pname = "ucd-tools"; inherit version src; sourceRoot = "${src.name}/src/ucd-tools"; nativeBuildInputs = [ cmake ]; installPhase = '' runHook preInstall mkdir $out cp -v libucd.a $out/ runHook postInstall ''; }; in stdenv.mkDerivation rec { pname = "espeak-ng"; version = "1.51.1"; version = "1.52.0"; src = fetchFromGitHub { owner = "espeak-ng"; repo = "espeak-ng"; rev = version; hash = "sha256-aAJ+k+kkOS6k835mEW7BvgAIYGhUHxf7Q4P5cKO8XTk="; tag = version; hash = "sha256-mmh5QPSVD5YQ0j16R+bEL5vcyWLtTNOJ/irBNzWY3ro="; }; patches = [ # Fix build with Clang 16. # https://github.com/espeak-ng/espeak-ng/pull/2274 ./libsonic.patch (fetchpatch { url = "https://github.com/espeak-ng/espeak-ng/commit/497c6217d696c1190c3e8b992ff7b9110eb3bedd.patch"; hash = "sha256-KfzqnRyQfz6nuMKnsHoUzb9rn9h/Pg54mupW1Cr+Zx0="; name = "espeak-ng-text-to-phonemes-with-terminator.patch"; url = "https://github.com/espeak-ng/espeak-ng/commit/2108b1e8ae02f49cc909894a1024efdfde6682fd.patch"; hash = "sha256-XjEc1r7F88xZOfeUey0R6Xv6vu4Wy8GtWxXFG2NTf9g="; }) ] ++ lib.optionals mbrolaSupport [ Loading @@ -46,14 +84,20 @@ stdenv.mkDerivation rec { }) ]; postPatch = lib.optionalString ucdSupport '' ln -s ${ucd-tools}/libucd.a src/ucd-tools/libucd.a ''; nativeBuildInputs = [ autoconf automake which cmake libtool ninja pkg-config ronn makeWrapper which ]; buildInputs = Loading @@ -61,45 +105,32 @@ stdenv.mkDerivation rec { ++ lib.optional pcaudiolibSupport pcaudiolib ++ lib.optional sonicSupport sonic; # touch ChangeLog to avoid below error on darwin: # Makefile.am: error: required file './ChangeLog.md' not found preConfigure = lib.optionalString stdenv.hostPlatform.isDarwin '' touch ChangeLog '' + '' ./autogen.sh ''; configureFlags = [ "--with-mbrola=${if mbrolaSupport then "yes" else "no"}" cmakeFlags = [ (lib.cmakeBool "BUILD_SHARED_LIBS" true) (lib.cmakeBool "USE_ASYNC" asyncSupport) (lib.cmakeBool "USE_KLATT" klattSupport) (lib.cmakeBool "USE_LIBPCAUDIO" pcaudiolibSupport) (lib.cmakeBool "USE_LIBSONIC" sonicSupport) (lib.cmakeBool "USE_MBROLA" mbrolaSupport) (lib.cmakeBool "USE_SPEECHPLAYER" speechPlayerSupport) ]; # ref https://github.com/void-linux/void-packages/blob/3cf863f894b67b3c93e23ac7830ca46b697d308a/srcpkgs/espeak-ng/template#L29-L31 postConfigure = lib.optionalString (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) '' substituteInPlace Makefile \ --replace 'ESPEAK_DATA_PATH=$(CURDIR) src/espeak-ng' 'ESPEAK_DATA_PATH=$(CURDIR) ${lib.getExe buildPackages.espeak-ng}' \ --replace 'espeak-ng-data/%_dict: src/espeak-ng' 'espeak-ng-data/%_dict: ${lib.getExe buildPackages.espeak-ng}' \ --replace '../src/espeak-ng --compile' "${lib.getExe buildPackages.espeak-ng} --compile" ''; postInstall = lib.optionalString stdenv.hostPlatform.isLinux '' patchelf --set-rpath "$(patchelf --print-rpath $out/bin/espeak-ng)" $out/bin/speak-ng wrapProgram $out/bin/espeak-ng \ --set ALSA_PLUGIN_DIR ${alsa-plugins}/lib/alsa-lib ''; passthru = { inherit mbrolaSupport; inherit mbrolaSupport ucd-tools; }; meta = with lib; { description = "Open source speech synthesizer that supports over 70 languages, based on eSpeak"; meta = { description = "Speech synthesizer that supports more than hundred languages and accents"; homepage = "https://github.com/espeak-ng/espeak-ng"; changelog = "https://github.com/espeak-ng/espeak-ng/blob/${version}/CHANGELOG.md"; license = licenses.gpl3Plus; maintainers = with maintainers; [ aske ]; platforms = platforms.all; changelog = "https://github.com/espeak-ng/espeak-ng/blob/${src.tag}/ChangeLog.md"; license = lib.licenses.gpl3Plus; maintainers = with lib.maintainers; [ aske ]; platforms = lib.platforms.all; mainProgram = "espeak-ng"; }; } pkgs/applications/audio/espeak-ng/libsonic.patch 0 → 100644 +41 −0 Original line number Diff line number Diff line diff --git a/cmake/deps.cmake b/cmake/deps.cmake index b63ced21..2cd1727b 100644 --- a/cmake/deps.cmake +++ b/cmake/deps.cmake @@ -13,20 +13,22 @@ endif(PTHREAD_LIB) if (MBROLA_BIN) set(HAVE_MBROLA ON) endif(MBROLA_BIN) -if (SONIC_LIB AND SONIC_INC) - set(HAVE_LIBSONIC ON) -else() - FetchContent_Declare(sonic-git - GIT_REPOSITORY https://github.com/waywardgeek/sonic.git - GIT_TAG fbf75c3d6d846bad3bb3d456cbc5d07d9fd8c104 - ) - FetchContent_MakeAvailable(sonic-git) - FetchContent_GetProperties(sonic-git) - add_library(sonic OBJECT ${sonic-git_SOURCE_DIR}/sonic.c) - target_include_directories(sonic PUBLIC ${sonic-git_SOURCE_DIR}) - set(HAVE_LIBSONIC ON) - set(SONIC_LIB sonic) - set(SONIC_INC ${sonic-git_SOURCE_DIR}) +if (USE_LIBSONIC) + if (SONIC_LIB AND SONIC_INC) + set(HAVE_LIBSONIC ON) + else() + FetchContent_Declare(sonic-git + GIT_REPOSITORY https://github.com/waywardgeek/sonic.git + GIT_TAG fbf75c3d6d846bad3bb3d456cbc5d07d9fd8c104 + ) + FetchContent_MakeAvailable(sonic-git) + FetchContent_GetProperties(sonic-git) + add_library(sonic OBJECT ${sonic-git_SOURCE_DIR}/sonic.c) + target_include_directories(sonic PUBLIC ${sonic-git_SOURCE_DIR}) + set(HAVE_LIBSONIC ON) + set(SONIC_LIB sonic) + set(SONIC_INC ${sonic-git_SOURCE_DIR}) + endif() endif() if (PCAUDIO_LIB AND PCAUDIO_INC) set(HAVE_LIBPCAUDIO ON) Loading
nixos/modules/services/desktop-managers/pantheon.nix +0 −1 Original line number Diff line number Diff line Loading @@ -173,7 +173,6 @@ in services.upower.enable = config.powerManagement.enable; services.libinput.enable = mkDefault true; services.switcherooControl.enable = mkDefault true; services.xserver.updateDbusEnvironment = true; services.zeitgeist.enable = mkDefault true; services.geoclue2.enable = mkDefault true; # pantheon has pantheon-agent-geoclue2 Loading
nixos/modules/services/home-automation/wyoming/piper.nix +13 −0 Original line number Diff line number Diff line Loading @@ -10,6 +10,7 @@ let cfg = config.services.wyoming.piper; inherit (lib) literalExpression mkOption mkEnableOption mkPackageOption Loading Loading @@ -100,6 +101,15 @@ in default = true; }; useCUDA = mkOption { type = bool; default = config.cudaSupport; defaultText = literalExpression "config.cudaSupport"; description = '' Whether to accelerate the underlying onnxruntime library with CUDA. ''; }; extraArgs = mkOption { type = listOf str; default = [ ]; Loading Loading @@ -165,6 +175,9 @@ in ++ lib.optionals options.streaming [ "--streaming" ] ++ lib.optionals options.cuda [ "--use-cuda" ] ++ options.extraArgs ); CapabilityBoundingSet = ""; Loading
nixos/modules/services/web-apps/invoiceplane.nix +5 −0 Original line number Diff line number Diff line Loading @@ -16,6 +16,8 @@ let invoiceplane-config = hostName: cfg: pkgs.writeText "ipconfig.php" '' # <?php exit('No direct script access allowed'); ?> IP_URL=http://${hostName} ENABLE_DEBUG=false DISABLE_SETUP=false Loading Loading @@ -353,6 +355,9 @@ in if ! grep -q IP_URL "${cfg.stateDir}/ipconfig.php"; then cp "${invoiceplane-config hostName cfg}" "${cfg.stateDir}/ipconfig.php" fi if ! grep -q 'php exit' "${cfg.stateDir}/ipconfig.php"; then sed -i "1i # <?php exit('No direct script access allowed'); ?>" "${cfg.stateDir}/ipconfig.php" fi '') eachSite ); wantedBy = [ "multi-user.target" ]; Loading
pkgs/applications/audio/espeak-ng/default.nix +74 −43 Original line number Diff line number Diff line Loading @@ -3,40 +3,78 @@ lib, fetchFromGitHub, fetchpatch, replaceVars, # build system autoconf, automake, which, cmake, libtool, makeWrapper, ninja, pkg-config, ronn, replaceVars, buildPackages, mbrolaSupport ? true, which, # dependencies alsa-plugins, asyncSupport ? true, klattSupport ? true, mbrola, pcaudiolibSupport ? true, mbrolaSupport ? true, pcaudiolib, sonicSupport ? true, pcaudiolibSupport ? true, sonic, alsa-plugins, makeWrapper, sonicSupport ? true, speechPlayerSupport ? true, ucdSupport ? false, }: let version = "1.52.0"; src = fetchFromGitHub { owner = "espeak-ng"; repo = "espeak-ng"; tag = version; hash = "sha256-mmh5QPSVD5YQ0j16R+bEL5vcyWLtTNOJ/irBNzWY3ro="; }; ucd-tools = stdenv.mkDerivation { pname = "ucd-tools"; inherit version src; sourceRoot = "${src.name}/src/ucd-tools"; nativeBuildInputs = [ cmake ]; installPhase = '' runHook preInstall mkdir $out cp -v libucd.a $out/ runHook postInstall ''; }; in stdenv.mkDerivation rec { pname = "espeak-ng"; version = "1.51.1"; version = "1.52.0"; src = fetchFromGitHub { owner = "espeak-ng"; repo = "espeak-ng"; rev = version; hash = "sha256-aAJ+k+kkOS6k835mEW7BvgAIYGhUHxf7Q4P5cKO8XTk="; tag = version; hash = "sha256-mmh5QPSVD5YQ0j16R+bEL5vcyWLtTNOJ/irBNzWY3ro="; }; patches = [ # Fix build with Clang 16. # https://github.com/espeak-ng/espeak-ng/pull/2274 ./libsonic.patch (fetchpatch { url = "https://github.com/espeak-ng/espeak-ng/commit/497c6217d696c1190c3e8b992ff7b9110eb3bedd.patch"; hash = "sha256-KfzqnRyQfz6nuMKnsHoUzb9rn9h/Pg54mupW1Cr+Zx0="; name = "espeak-ng-text-to-phonemes-with-terminator.patch"; url = "https://github.com/espeak-ng/espeak-ng/commit/2108b1e8ae02f49cc909894a1024efdfde6682fd.patch"; hash = "sha256-XjEc1r7F88xZOfeUey0R6Xv6vu4Wy8GtWxXFG2NTf9g="; }) ] ++ lib.optionals mbrolaSupport [ Loading @@ -46,14 +84,20 @@ stdenv.mkDerivation rec { }) ]; postPatch = lib.optionalString ucdSupport '' ln -s ${ucd-tools}/libucd.a src/ucd-tools/libucd.a ''; nativeBuildInputs = [ autoconf automake which cmake libtool ninja pkg-config ronn makeWrapper which ]; buildInputs = Loading @@ -61,45 +105,32 @@ stdenv.mkDerivation rec { ++ lib.optional pcaudiolibSupport pcaudiolib ++ lib.optional sonicSupport sonic; # touch ChangeLog to avoid below error on darwin: # Makefile.am: error: required file './ChangeLog.md' not found preConfigure = lib.optionalString stdenv.hostPlatform.isDarwin '' touch ChangeLog '' + '' ./autogen.sh ''; configureFlags = [ "--with-mbrola=${if mbrolaSupport then "yes" else "no"}" cmakeFlags = [ (lib.cmakeBool "BUILD_SHARED_LIBS" true) (lib.cmakeBool "USE_ASYNC" asyncSupport) (lib.cmakeBool "USE_KLATT" klattSupport) (lib.cmakeBool "USE_LIBPCAUDIO" pcaudiolibSupport) (lib.cmakeBool "USE_LIBSONIC" sonicSupport) (lib.cmakeBool "USE_MBROLA" mbrolaSupport) (lib.cmakeBool "USE_SPEECHPLAYER" speechPlayerSupport) ]; # ref https://github.com/void-linux/void-packages/blob/3cf863f894b67b3c93e23ac7830ca46b697d308a/srcpkgs/espeak-ng/template#L29-L31 postConfigure = lib.optionalString (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) '' substituteInPlace Makefile \ --replace 'ESPEAK_DATA_PATH=$(CURDIR) src/espeak-ng' 'ESPEAK_DATA_PATH=$(CURDIR) ${lib.getExe buildPackages.espeak-ng}' \ --replace 'espeak-ng-data/%_dict: src/espeak-ng' 'espeak-ng-data/%_dict: ${lib.getExe buildPackages.espeak-ng}' \ --replace '../src/espeak-ng --compile' "${lib.getExe buildPackages.espeak-ng} --compile" ''; postInstall = lib.optionalString stdenv.hostPlatform.isLinux '' patchelf --set-rpath "$(patchelf --print-rpath $out/bin/espeak-ng)" $out/bin/speak-ng wrapProgram $out/bin/espeak-ng \ --set ALSA_PLUGIN_DIR ${alsa-plugins}/lib/alsa-lib ''; passthru = { inherit mbrolaSupport; inherit mbrolaSupport ucd-tools; }; meta = with lib; { description = "Open source speech synthesizer that supports over 70 languages, based on eSpeak"; meta = { description = "Speech synthesizer that supports more than hundred languages and accents"; homepage = "https://github.com/espeak-ng/espeak-ng"; changelog = "https://github.com/espeak-ng/espeak-ng/blob/${version}/CHANGELOG.md"; license = licenses.gpl3Plus; maintainers = with maintainers; [ aske ]; platforms = platforms.all; changelog = "https://github.com/espeak-ng/espeak-ng/blob/${src.tag}/ChangeLog.md"; license = lib.licenses.gpl3Plus; maintainers = with lib.maintainers; [ aske ]; platforms = lib.platforms.all; mainProgram = "espeak-ng"; }; }
pkgs/applications/audio/espeak-ng/libsonic.patch 0 → 100644 +41 −0 Original line number Diff line number Diff line diff --git a/cmake/deps.cmake b/cmake/deps.cmake index b63ced21..2cd1727b 100644 --- a/cmake/deps.cmake +++ b/cmake/deps.cmake @@ -13,20 +13,22 @@ endif(PTHREAD_LIB) if (MBROLA_BIN) set(HAVE_MBROLA ON) endif(MBROLA_BIN) -if (SONIC_LIB AND SONIC_INC) - set(HAVE_LIBSONIC ON) -else() - FetchContent_Declare(sonic-git - GIT_REPOSITORY https://github.com/waywardgeek/sonic.git - GIT_TAG fbf75c3d6d846bad3bb3d456cbc5d07d9fd8c104 - ) - FetchContent_MakeAvailable(sonic-git) - FetchContent_GetProperties(sonic-git) - add_library(sonic OBJECT ${sonic-git_SOURCE_DIR}/sonic.c) - target_include_directories(sonic PUBLIC ${sonic-git_SOURCE_DIR}) - set(HAVE_LIBSONIC ON) - set(SONIC_LIB sonic) - set(SONIC_INC ${sonic-git_SOURCE_DIR}) +if (USE_LIBSONIC) + if (SONIC_LIB AND SONIC_INC) + set(HAVE_LIBSONIC ON) + else() + FetchContent_Declare(sonic-git + GIT_REPOSITORY https://github.com/waywardgeek/sonic.git + GIT_TAG fbf75c3d6d846bad3bb3d456cbc5d07d9fd8c104 + ) + FetchContent_MakeAvailable(sonic-git) + FetchContent_GetProperties(sonic-git) + add_library(sonic OBJECT ${sonic-git_SOURCE_DIR}/sonic.c) + target_include_directories(sonic PUBLIC ${sonic-git_SOURCE_DIR}) + set(HAVE_LIBSONIC ON) + set(SONIC_LIB sonic) + set(SONIC_INC ${sonic-git_SOURCE_DIR}) + endif() endif() if (PCAUDIO_LIB AND PCAUDIO_INC) set(HAVE_LIBPCAUDIO ON)