aboutsummaryrefslogtreecommitdiff
path: root/tests/modules/services/fluidsynth/service.nix
diff options
context:
space:
mode:
authorVincent Breitmoser <look@my.amazin.horse>2020-06-13 13:34:16 +0200
committerRobert Helgesson <robert@rycee.net>2020-06-14 15:30:51 +0200
commitb0e8a1569ed289ae1c644277b720882baba9304e (patch)
tree80bd5772d8bdd2228fd97a9a7e280c12445b97a3 /tests/modules/services/fluidsynth/service.nix
parent1b210e7143547ce0f41e8082b8d27e9c7d220351 (diff)
fluidsynth: add module
Fluidsynth is a real-time MIDI synthesizer based on the SoundFont 2 format. PR #1326
Diffstat (limited to '')
-rw-r--r--tests/modules/services/fluidsynth/service.nix24
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/modules/services/fluidsynth/service.nix b/tests/modules/services/fluidsynth/service.nix
new file mode 100644
index 00000000000..8d53e75c032
--- /dev/null
+++ b/tests/modules/services/fluidsynth/service.nix
@@ -0,0 +1,24 @@
+{ config, pkgs, ... }: {
+ config = {
+ services.fluidsynth.enable = true;
+ services.fluidsynth.soundFont = "/path/to/soundFont";
+ services.fluidsynth.extraOptions = [ "--sample-rate 96000" ];
+
+ nixpkgs.overlays = [
+ (self: super: {
+ fluidsynth = pkgs.writeScriptBin "dummy-fluidsynth" "" // {
+ outPath = "@fluidsynth@";
+ };
+ })
+ ];
+
+ nmt.script = ''
+ serviceFile=home-files/.config/systemd/user/fluidsynth.service
+
+ assertFileExists $serviceFile
+
+ assertFileContains $serviceFile \
+ 'ExecStart=@fluidsynth@/bin/fluidsynth -a pulseaudio -si --sample-rate 96000 /path/to/soundFont'
+ '';
+ };
+}