nixpkgs-suyu/pkgs/servers/misc/navidrome/default.nix

38 lines
939 B
Nix
Raw Normal View History

2020-06-20 15:08:46 +02:00
{ stdenv, fetchurl, ffmpeg, ffmpegSupport ? true, makeWrapper }:
with stdenv.lib;
stdenv.mkDerivation rec {
pname = "navidrome";
2020-11-22 23:44:46 +01:00
version = "0.38.0";
2020-06-20 15:08:46 +02:00
src = fetchurl {
url = "https://github.com/deluan/navidrome/releases/download/v${version}/navidrome_${version}_Linux_x86_64.tar.gz";
2020-11-22 23:44:46 +01:00
sha256 = "01fkzsvdz1b43m8glxl01vw7d19w5fglk9x1rj5bab8fgrx149w8";
2020-06-20 15:08:46 +02:00
};
nativeBuildInputs = [ makeWrapper ];
unpackPhase = ''
tar xvf $src navidrome
'';
installPhase = ''
mkdir -p $out/bin
cp navidrome $out/bin
'';
postFixup = ''
wrapProgram $out/bin/navidrome \
--prefix PATH : ${makeBinPath (optional ffmpegSupport ffmpeg)}
'';
2020-11-22 23:44:46 +01:00
2020-06-20 15:08:46 +02:00
meta = {
description = "Navidrome Music Server and Streamer compatible with Subsonic/Airsonic";
homepage = "https://www.navidrome.org/";
license = licenses.gpl3;
platforms = [ "x86_64-linux" ];
maintainers = with maintainers; [ aciceri ];
};
}