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