1 { lib, stdenv, fetchurl, mono, libmediainfo, sqlite, curl, chromaprint, makeWrapper, icu, dotnet-runtime, openssl, nixosTests, zlib }:
4 os = if stdenv.isDarwin then "osx" else "linux";
7 aarch64-linux = "arm64";
9 }."${stdenv.hostPlatform.system}" or (throw "Unsupported system: ${stdenv.hostPlatform.system}");
11 x64-linux_hash = "sha256-ulWg9BhDr/RFE4sfXGf+i9W0KpOYKjtk49qBeIwI9dU=";
12 arm64-linux_hash = "sha256-iSXXx89I7Pj2nAuapHwJtIblj+TDrd/k9OiBK8QExSg=";
13 x64-osx_hash = "sha256-xjnDePaxQWRNo1VmH1sbp0Xtvbac3nu0+fiMg0wMddg=";
14 }."${arch}-${os}_hash";
15 in stdenv.mkDerivation rec {
17 version = "2.3.3.4204";
20 url = "https://github.com/lidarr/Lidarr/releases/download/v${version}/Lidarr.master.${version}.${os}-core-${arch}.tar.gz";
24 nativeBuildInputs = [ makeWrapper ];
29 mkdir -p $out/{bin,share/${pname}-${version}}
30 cp -r * $out/share/${pname}-${version}/.
31 makeWrapper "${dotnet-runtime}/bin/dotnet" $out/bin/Lidarr \
32 --add-flags "$out/share/${pname}-${version}/Lidarr.dll" \
33 --prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [
34 curl sqlite libmediainfo icu openssl zlib ]}
41 updateScript = ./update.sh;
42 tests.smoke-test = nixosTests.lidarr;
46 description = "Usenet/BitTorrent music downloader";
47 homepage = "https://lidarr.audio/";
48 license = licenses.gpl3;
49 maintainers = [ maintainers.etu ];
50 mainProgram = "Lidarr";
51 platforms = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" ];