1 { stdenv, lib, fetchurl, makeWrapper, unzip, python3, libarchive, ffmpeg, nixosTests }:
9 stdenv.mkDerivation rec {
16 url = "https://github.com/morpheus65535/bazarr/releases/download/v${version}/bazarr.zip";
17 sha256 = "sha256-tmTdmUfRBRlB14juNxUo65Re+9agUBX0BBSuNu3pSC0=";
20 nativeBuildInputs = [ unzip makeWrapper ];
23 (python3.withPackages (ps: [
36 mkdir -p "$out"/{bin,share/${pname}}
37 cp -r * "$out/share/${pname}"
39 # Add missing shebang and execute perms so that patchShebangs can do its
41 sed -i "1i #!/usr/bin/env python3" "$out/share/${pname}/bazarr.py"
42 chmod +x "$out/share/${pname}/bazarr.py"
44 makeWrapper "$out/share/${pname}/bazarr.py" \
46 --suffix PATH : ${lib.makeBinPath runtimeProgDeps}
52 smoke-test = nixosTests.bazarr;
56 description = "Subtitle manager for Sonarr and Radarr";
57 homepage = "https://www.bazarr.media/";
58 sourceProvenance = with sourceTypes; [ binaryNativeCode ];
59 license = licenses.gpl3Only;
60 maintainers = with maintainers; [ d-xo ];
61 mainProgram = "bazarr";
62 platforms = platforms.all;