diff --git a/nix/pkgs/default.nix b/nix/pkgs/default.nix index 8e07214d9c..1db86af820 100644 --- a/nix/pkgs/default.nix +++ b/nix/pkgs/default.nix @@ -81,4 +81,6 @@ callPackage ./archipelago { factorio-rcon-py = callPackage ./archipelago/factorio-rcon-py.nix { }; }; + + freeswitch-sounds = pkgs.callPackage ./freeswitch-sounds.nix { }; } // (import ./heptapod-runner args) diff --git a/nix/pkgs/freeswitch-sounds.nix b/nix/pkgs/freeswitch-sounds.nix new file mode 100644 index 0000000000..b61f8b1e3c --- /dev/null +++ b/nix/pkgs/freeswitch-sounds.nix @@ -0,0 +1,38 @@ +{ stdenv +, fetchFromGitHub +, ... }: + +stdenv.mkDerivation rec { + pname = "freeswitch-sounds"; + version = "1.0.53"; + + src = fetchFromGitHub { + owner = "freeswitch"; + repo = "freeswitch-sounds"; + rev = "fbe44d17b3cb13fcc8dff190d232162e411ce2db"; + sha256 = "sha256:021qbdvbhc63va32xndqbdanjysijx2b5an3bzw4ya7b2icnfl0s"; + }; + + installPhase = '' + runHook preInstall + + mkdir $out + for voice in en/ca/june en/us/{allison,callie} es/ar/mario fr/ca/june pt/BR/karina ru/RU/{elena,kirill,vika} sv/se/jakob zh/{cn,hk}/sinmei; do + mkdir -p $out/$voice + for category in $voice/*; do + test -d $category || continue + + for f in $category/*/*; do + filename=$(basename $f) + rootname=$(dirname $(dirname $f)) + mkdir -p $out/$rootname + cp $f $out/$rootname/$filename + done + done + done + + cp -Rv music $out/music + + runHook postInstall + ''; +}