gonic: 0.14.0 -> 0.15.0

This commit is contained in:
Michal Koutenský 2022-12-04 13:43:38 +01:00 committed by Michal Koutenský
parent bf4acff908
commit 1e7261a279
2 changed files with 18 additions and 15 deletions

View file

@ -1,6 +1,5 @@
{ lib, stdenv, buildGoModule, fetchFromGitHub { lib, stdenv, buildGoModule, fetchFromGitHub
, pkg-config, taglib, alsa-lib , pkg-config, taglib, zlib
, zlib, AudioToolbox, AppKit
# Disable on-the-fly transcoding, # Disable on-the-fly transcoding,
# removing the dependency on ffmpeg. # removing the dependency on ffmpeg.
@ -8,32 +7,37 @@
# to the original file, but if transcoding is configured # to the original file, but if transcoding is configured
# that takes a while. So best to disable all transcoding # that takes a while. So best to disable all transcoding
# in the configuration if you disable transcodingSupport. # in the configuration if you disable transcodingSupport.
, transcodingSupport ? true, ffmpeg }: , transcodingSupport ? true, ffmpeg
, mpv }:
buildGoModule rec { buildGoModule rec {
pname = "gonic"; pname = "gonic";
version = "0.14.0"; version = "0.15.0";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "sentriz"; owner = "sentriz";
repo = pname; repo = pname;
rev = "v${version}"; rev = "v${version}";
sha256 = "sha256-wX97HtvHgHpKTDwZl/wHQRpiyDJ7U38CpdzWu/CYizQ="; sha256 = "sha256-sTvdMLa7rwrTRDH5DR5nJCzzbtXM9y8mq63CNR1lVfI=";
}; };
nativeBuildInputs = [ pkg-config ]; nativeBuildInputs = [ pkg-config ];
buildInputs = [ taglib zlib ] buildInputs = [ taglib zlib ];
++ lib.optionals stdenv.isLinux [ alsa-lib ] vendorSha256 = "sha256-B9qzhh7FKkZPfuylxlyNP0blU5sjGwM6bLsw+vFkkb4=";
++ lib.optionals stdenv.isDarwin [ AudioToolbox AppKit ];
vendorSha256 = "sha256-oTuaA5ZsZ7zMcjzGh37zO/1XyOfj6xjfNr6A7ecrOiA=";
# TODO(Profpatsch): write a test for transcoding support, # TODO(Profpatsch): write a test for transcoding support,
# since it is prone to break # since it is prone to break
postPatch = lib.optionalString transcodingSupport '' postPatch = lib.optionalString transcodingSupport ''
substituteInPlace \ substituteInPlace \
server/encode/encode.go \ transcode/transcode.go \
--replace \ --replace \
'"ffmpeg"' \ '`ffmpeg' \
'"${lib.getBin ffmpeg}/bin/ffmpeg"' '`${lib.getBin ffmpeg}/bin/ffmpeg'
'' + ''
substituteInPlace \
jukebox/jukebox.go \
--replace \
'"mpv"' \
'"${lib.getBin mpv}/bin/mpv"'
''; '';
meta = { meta = {
@ -41,5 +45,6 @@ buildGoModule rec {
description = "Music streaming server / subsonic server API implementation"; description = "Music streaming server / subsonic server API implementation";
license = lib.licenses.gpl3Plus; license = lib.licenses.gpl3Plus;
maintainers = with lib.maintainers; [ Profpatsch ]; maintainers = with lib.maintainers; [ Profpatsch ];
platforms = lib.platforms.linux;
}; };
} }

View file

@ -29141,9 +29141,7 @@ with pkgs;
gollum = callPackage ../applications/misc/gollum { }; gollum = callPackage ../applications/misc/gollum { };
gonic = callPackage ../servers/gonic { gonic = callPackage ../servers/gonic { };
inherit (darwin.apple_sdk.frameworks) AppKit AudioToolbox;
};
goodvibes = callPackage ../applications/audio/goodvibes { }; goodvibes = callPackage ../applications/audio/goodvibes { };