depot/third_party/nixpkgs/pkgs/servers/misc/navidrome/default.nix
Default email b6f2ab0a42 Project import generated by Copybara.
GitOrigin-RevId: 253aecf69ed7595aaefabde779aa6449195bebb7
2021-08-18 15:19:15 +02:00

43 lines
1 KiB
Nix

{ lib, stdenv, fetchurl, ffmpeg, ffmpegSupport ? true, makeWrapper, nixosTests }:
with lib;
stdenv.mkDerivation rec {
pname = "navidrome";
version = "0.44.1";
src = fetchurl {
url = "https://github.com/deluan/navidrome/releases/download/v${version}/navidrome_${version}_Linux_x86_64.tar.gz";
sha256 = "sha256-2lnj6aNLPeLwxgyRUQFOQJDsOSMu9Banez8RMMQs74Y=";
};
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)}
'';
passthru.tests.navidrome = nixosTests.navidrome;
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 ];
};
}