freeswitch-sounds: init

This commit is contained in:
Luke Granger-Brown 2023-11-17 10:58:06 +00:00
parent 20490c0853
commit cb845df067
2 changed files with 40 additions and 0 deletions

View file

@ -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)

View file

@ -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
'';
}