b450903751
GitOrigin-RevId: 74a1793c659d09d7cf738005308b1f86c90cb59b
40 lines
1.1 KiB
Nix
40 lines
1.1 KiB
Nix
{ stdenv, lib, fetchurl, makeWrapper, unzip, python3, unrar, ffmpeg, nixosTests }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "bazarr";
|
|
version = "1.1.1";
|
|
|
|
sourceRoot = ".";
|
|
|
|
src = fetchurl {
|
|
url = "https://github.com/morpheus65535/bazarr/releases/download/v${version}/bazarr.zip";
|
|
sha256 = "sha256-ClVHThhcf4QkYhgJevTKroBe0z0YZX83qKFB0thH6eM=";
|
|
};
|
|
|
|
nativeBuildInputs = [ unzip makeWrapper ];
|
|
|
|
installPhase = ''
|
|
mkdir -p $out/{bin,share/${pname}-${version}}
|
|
cp -r * $out/share/${pname}-${version}
|
|
makeWrapper "${
|
|
(python3.withPackages
|
|
(ps: [ ps.lxml ps.numpy ps.gevent ps.gevent-websocket ])).interpreter
|
|
}" \
|
|
$out/bin/bazarr \
|
|
--add-flags "$out/share/${pname}-${version}/bazarr.py" \
|
|
--suffix PATH : ${lib.makeBinPath [ unrar ffmpeg ]}
|
|
'';
|
|
|
|
passthru.tests = {
|
|
smoke-test = nixosTests.bazarr;
|
|
};
|
|
|
|
meta = with lib; {
|
|
description = "Subtitle manager for Sonarr and Radarr";
|
|
homepage = "https://www.bazarr.media/";
|
|
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
|
|
license = licenses.gpl3Only;
|
|
maintainers = with maintainers; [ d-xo ];
|
|
platforms = platforms.all;
|
|
};
|
|
}
|