navidrome-bin: init at 0.45.1

This is basically copied from nixpkgs-unstable's navidrome derivation
but updated to current version.

I'd prefer building this from source, but currently only manage to build
the backend-only version without the web UI, as building both requires
somehow building a node.js package inside a Go package.
master
Andreas Wiese 2021-08-29 23:00:06 +02:00
parent 1c6b646175
commit 56c0b03832
3 changed files with 44 additions and 0 deletions

View File

@ -16,6 +16,8 @@ in rec {
chrysalis-bin = callPackage ./pkgs/chrysalis-bin { };
navidrome-bin = callPackage ./pkgs/navidrome-bin { };
ryzenadj = callPackage ./pkgs/ryzenadj { };
ryzen_smu = callPackage ./pkgs/ryzen_smu { kernel = pkgs.linux; };

View File

@ -38,6 +38,7 @@
} // prev.lib.optionalAttrs (prev.system == "x86_64-linux") {
inherit (localPkgs)
chrysalis-bin
navidrome-bin
ryzenadj
ryzen_smu
;

View File

@ -0,0 +1,41 @@
{ lib, stdenv, fetchurl, ffmpeg, ffmpegSupport ? true, makeWrapper }:
with lib;
stdenv.mkDerivation rec {
pname = "navidrome";
version = "0.45.1";
src = fetchurl {
url = "https://github.com/deluan/navidrome/releases/download/v${version}/navidrome_${version}_Linux_x86_64.tar.gz";
sha256 = "sha256-TZcXq51sKoeLPmcRpv4VILDmS6dsS7lxlJzTDH0tEWM=";
};
nativeBuildInputs = [ makeWrapper ];
unpackPhase = ''
tar xvf $src navidrome
'';
installPhase = ''
runHook preInstall
mkdir -p $out/bin
cp navidrome $out/bin
runHook postInstall
'';
postFixup = ''
wrapProgram $out/bin/navidrome \
--prefix PATH : ${makeBinPath (optional ffmpegSupport ffmpeg)}
'';
meta = {
description = "Navidrome Music Server and Streamer compatible with Subsonic/Airsonic";
homepage = "https://www.navidrome.org/";
license = licenses.gpl3Only;
platforms = [ "x86_64-linux" ];
maintainers = with maintainers; [ aciceri ];
};
}