git.iko.soy/typeable/nixpkgs
on master help sign in
gonic: fix transcoding support

ffmpeg is not needed as a library at build time, but rather as an executable at runtime.

commitb6475a8f907053a9e742fab46d34c123876d18fd authorProfpatsch <mail@profpatsch.de> dateWed 5 May 2021, 13:02 (6 years ago) parent012cb9d
1 file changed+11−1
pkgs/servers/gonic/default.nix+11−1
pkgs/servers/gonic/default.nix+11−1
@@ -20,9 +20,19 @@ buildGoModule rec {
2020 };
2121
2222 nativeBuildInputs = [ pkg-config ];
23− buildInputs = [ taglib alsaLib ] ++ lib.optionals transcodingSupport [ ffmpeg ];
23+ buildInputs = [ taglib alsaLib ];
2424 vendorSha256 = "0inxlqxnkglz4j14jav8080718a80nqdcl866lkql8r6zcxb4fm9";
2525
26+ # TODO(Profpatsch): write a test for transcoding support,
27+ # since it is prone to break
28+ postPatch = lib.optionalString transcodingSupport ''
29+ substituteInPlace \
30+ server/encode/encode.go \
31+ --replace \
32+ '"ffmpeg"' \
33+ '"${lib.getBin ffmpeg}/bin/ffmpeg"'
34+ '';
35+
2636 meta = {
2737 homepage = "https://github.com/sentriz/gonic";
2838 description = "Music streaming server / subsonic server API implementation";