From b6475a8f907053a9e742fab46d34c123876d18fd Mon Sep 17 00:00:00 2001 From: Profpatsch Date: Wed, 5 May 2021 13:02:52 +0200 Subject: gonic: fix transcoding support ffmpeg is not needed as a library at build time, but rather as an executable at runtime. --- pkgs/servers/gonic/default.nix | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'pkgs/servers/gonic/default.nix') diff --git a/pkgs/servers/gonic/default.nix b/pkgs/servers/gonic/default.nix index fbefca063a8..b807a1ff757 100644 --- a/pkgs/servers/gonic/default.nix +++ b/pkgs/servers/gonic/default.nix @@ -20,9 +20,19 @@ buildGoModule rec { }; nativeBuildInputs = [ pkg-config ]; - buildInputs = [ taglib alsaLib ] ++ lib.optionals transcodingSupport [ ffmpeg ]; + buildInputs = [ taglib alsaLib ]; vendorSha256 = "0inxlqxnkglz4j14jav8080718a80nqdcl866lkql8r6zcxb4fm9"; + # TODO(Profpatsch): write a test for transcoding support, + # since it is prone to break + postPatch = lib.optionalString transcodingSupport '' + substituteInPlace \ + server/encode/encode.go \ + --replace \ + '"ffmpeg"' \ + '"${lib.getBin ffmpeg}/bin/ffmpeg"' + ''; + meta = { homepage = "https://github.com/sentriz/gonic"; description = "Music streaming server / subsonic server API implementation"; -- cgit 1.4.1