diff --git a/nixos/modules/services/misc/emby.nix b/nixos/modules/services/misc/emby.nix index fe872349f45..9f290ed70c9 100644 --- a/nixos/modules/services/misc/emby.nix +++ b/nixos/modules/services/misc/emby.nix @@ -43,7 +43,7 @@ in User = cfg.user; Group = cfg.group; PermissionsStartOnly = "true"; - ExecStart = "${pkgs.mono}/bin/mono ${pkgs.emby}/bin/MediaBrowser.Server.Mono.exe"; + ExecStart = "${pkgs.emby}/bin/MediaBrowser.Server.Mono"; Restart = "on-failure"; }; }; diff --git a/pkgs/servers/emby/default.nix b/pkgs/servers/emby/default.nix index b1667bd3366..0a6bcdc72af 100644 --- a/pkgs/servers/emby/default.nix +++ b/pkgs/servers/emby/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, pkgs, ... }: +{ stdenv, fetchurl, pkgs, makeWrapper, mono, ffmpeg, ... }: stdenv.mkDerivation rec { name = "emby-${version}"; @@ -9,6 +9,9 @@ stdenv.mkDerivation rec { sha256 = "0xm3jw8ll49akr4fxa5qjbsglcgb6fq6nc54zppannxdlfkqj5jk"; }; + buildInputs = with pkgs; [ + makeWrapper + ]; propagatedBuildInputs = with pkgs; [ mono sqlite @@ -23,6 +26,9 @@ stdenv.mkDerivation rec { installPhase = '' mkdir -p $out/bin cp -r MediaBrowser.Server.Mono/bin/Release\ Mono/* $out/bin/ + + makeWrapper "${mono}/bin/mono" $out/bin/MediaBrowser.Server.Mono \ + --add-flags "$out/bin/MediaBrowser.Server.Mono.exe -ffmpeg ${ffmpeg}/bin/ffmpeg -ffprobe ${ffmpeg}/bin/ffprobe" ''; meta = {