pull straight from servarr

This commit is contained in:
Joseph Hanson 2025-02-04 12:02:57 -06:00
parent de9e778a9d
commit 12f1164e0c
Signed by: jahanson
SSH key fingerprint: SHA256:vy6dKBECV522aPAwklFM3ReKAVB086rT3oWwiuiFG7o

View file

@ -12,9 +12,11 @@
openssl,
nixosTests,
zlib,
}:
let
os = if stdenv.hostPlatform.isDarwin then "osx" else "linux";
}: let
os =
if stdenv.hostPlatform.isDarwin
then "osx"
else "linux";
arch =
{
x86_64-linux = "x64";
@ -22,11 +24,12 @@ let
x86_64-darwin = "x64";
aarch64-darwin = "arm64";
}
."${stdenv.hostPlatform.system}" or (throw "Unsupported system: ${stdenv.hostPlatform.system}");
."${stdenv.hostPlatform.system}"
or (throw "Unsupported system: ${stdenv.hostPlatform.system}");
hash =
{
x64-linux_hash = "sha256-/vsU0M8jyyfYVpE75gSa7R6aSyhxBg8gO3c+G3qCA+E=";
x64-linux_hash = "sha256-M2qpyV8fdFleWge1k1EUEeGFg4G7caxkShIriac8bYk=";
arm64-linux_hash = lib.fakeSha256;
x64-osx_hash = lib.fakeSha256;
arm64-osx_hash = lib.fakeSha256;
@ -35,15 +38,22 @@ let
in
stdenv.mkDerivation rec {
pname = "sonarr";
version = "4.0.12.2823";
version = "4.0.12.2900";
branch = "develop";
src = fetchurl {
url = "https://github.com/Sonarr/Sonarr/releases/download/v${version}/Sonarr.main.${version}.${os}-${arch}.tar.gz";
# url = "https://github.com/Sonarr/Sonarr/releases/download/v${version}/Sonarr.main.${version}.${os}-${arch}.tar.gz";
url = "https://services.sonarr.tv/v1/update/${branch}/download?version=${version}&os=${os}&runtime=netcore&arch=${arch}";
sha256 = hash;
};
nativeBuildInputs = [makeWrapper];
unpackPhase = ''
mkdir -p $out
tar -zxf $src --strip-components=1
'';
installPhase = ''
runHook preInstall