Unverified Commit aca825fc authored by Sandro Jäckel's avatar Sandro Jäckel Committed by GitHub
Browse files

gonic: 0.18.0 -> 0.19.0 (#451920)

parents 99c3b5e7 8c0f2d94
Loading
Loading
Loading
Loading
+12 −1
Original line number Diff line number Diff line
@@ -10,6 +10,10 @@ let
    mkKeyValue = lib.generators.mkKeyValueDefault { } " ";
    listsAsDuplicateKeys = true;
  };
  assertKey = key: {
    assertion = cfg.settings ? ${key};
    message = "Please set services.gonic.settings.${key}. See https://github.com/sentriz/gonic#configuration-options for supported values.";
  };
in
{
  options = {
@@ -29,6 +33,7 @@ in
        example = {
          music-path = [ "/mnt/music" ];
          podcast-path = "/mnt/podcasts";
          playlists-path = "/mnt/playlists";
        };
        description = ''
          Configuration for Gonic, see <https://github.com/sentriz/gonic#configuration-options> for supported values.
@@ -39,6 +44,12 @@ in
  };

  config = lib.mkIf cfg.enable {
    assertions = [
      (assertKey "music-path")
      (assertKey "podcast-path")
      (assertKey "playlists-path")
    ];

    systemd.services.gonic = {
      description = "Gonic Media Server";
      after = [ "network.target" ];
@@ -62,6 +73,7 @@ in
        BindPaths = [
          cfg.settings.playlists-path
          cfg.settings.podcast-path
          cfg.settings.cache-path
        ];
        BindReadOnlyPaths = [
          # gonic can access scrobbling services
@@ -94,7 +106,6 @@ in
        ];
        RestrictRealtime = true;
        LockPersonality = true;
        MemoryDenyWriteExecute = true;
        UMask = "0066";
        ProtectHostname = true;
      };
+3 −8
Original line number Diff line number Diff line
@@ -20,20 +20,15 @@

buildGoModule rec {
  pname = "gonic";
  version = "0.18.0";
  version = "0.19.0";
  src = fetchFromGitHub {
    owner = "sentriz";
    repo = "gonic";
    rev = "v${version}";
    sha256 = "sha256-qWUADZntJg8722Kxt3z1cwIOTcjxS0PYC0RHzselkdI=";
    sha256 = "sha256-la3xBECo4zZfkp5BlXuUzFEUGtxMl8ZAQdwgjFXIuSM=";
  };

  nativeBuildInputs = [ pkg-config ];
  buildInputs = [
    taglib
    zlib
  ];
  vendorHash = "sha256-HY+57SJsz/kPxSadjFl4LQ1Jlu3A5I+rpih67cMMGHA=";
  vendorHash = "sha256-HrYS7c0MtiOYRyiSg7eLbiSIUkHeRikJ0Rwf4EoZIsQ=";

  # TODO(Profpatsch): write a test for transcoding support,
  # since it is prone to break