1 { lib, stdenv, fetchurl, makeWrapper, autoPatchelfHook, fixDarwinDylibNames, zlib, krb5, openssl, icu, nixosTests }:
4 os = if stdenv.isDarwin then "osx" else "linux";
7 aarch64-linux = "arm64";
9 }."${stdenv.hostPlatform.system}" or (throw
10 "Unsupported system: ${stdenv.hostPlatform.system}");
13 x64-linux_hash = "sha256-4343S9fxNmoZhbfq/ZAfI2wF7ZwIw7IyyyZUsga48Zo=";
14 arm64-linux_hash = "sha256-XnR/uT73luKSpYr6ieZyu0mjOy23XGs5UVDke0IU9PQ=";
15 x64-osx_hash = "sha256-4EoMZm++T4K2zwPw8G4J44RV/HcssAdzmKjQFqBXbwY=";
16 }."${arch}-${os}_hash";
18 in stdenv.mkDerivation rec {
25 url = "https://github.com/Ombi-app/Ombi/releases/download/v${version}/${os}-${arch}.tar.gz";
29 nativeBuildInputs = [ makeWrapper ]
30 ++ lib.optional stdenv.hostPlatform.isLinux autoPatchelfHook
31 ++ lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames;
33 propagatedBuildInputs = [ stdenv.cc.cc zlib krb5 ];
36 mkdir -p $out/{bin,share/${pname}-${version}}
37 cp -r * $out/share/${pname}-${version}
39 makeWrapper $out/share/${pname}-${version}/Ombi $out/bin/Ombi \
40 --prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ openssl icu ]} \
41 --chdir "$out/share/${pname}-${version}"
45 updateScript = ./update.sh;
46 tests.smoke-test = nixosTests.ombi;
50 description = "Self-hosted web application that automatically gives your shared Plex or Emby users the ability to request content by themselves";
51 homepage = "https://ombi.io/";
52 sourceProvenance = with sourceTypes; [ binaryNativeCode ];
53 license = licenses.gpl2Only;
54 maintainers = with maintainers; [ woky ];
55 platforms = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" ];