2021-08-05 21:33:18 +00:00
|
|
|
{ stdenv, lib, fetchurl, makeWrapper, unzip, python3, unrar, ffmpeg, nixosTests }:
|
2020-05-29 06:06:01 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "bazarr";
|
2022-01-13 20:06:32 +00:00
|
|
|
version = "1.0.2";
|
2020-05-29 06:06:01 +00:00
|
|
|
|
2021-08-05 21:33:18 +00:00
|
|
|
sourceRoot = ".";
|
|
|
|
|
2020-05-29 06:06:01 +00:00
|
|
|
src = fetchurl {
|
2021-08-05 21:33:18 +00:00
|
|
|
url = "https://github.com/morpheus65535/bazarr/releases/download/v${version}/bazarr.zip";
|
2022-01-13 20:06:32 +00:00
|
|
|
sha256 = "sha256-aI5uxfMR+UpwxbUsJNNYYjqVX2epk60JbqWHRhB4v7I=";
|
2020-05-29 06:06:01 +00:00
|
|
|
};
|
|
|
|
|
2021-08-05 21:33:18 +00:00
|
|
|
nativeBuildInputs = [ unzip makeWrapper ];
|
2020-05-29 06:06:01 +00:00
|
|
|
|
|
|
|
installPhase = ''
|
2021-08-05 21:33:18 +00:00
|
|
|
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
|
|
|
|
}" \
|
2020-05-29 06:06:01 +00:00
|
|
|
$out/bin/bazarr \
|
2021-08-05 21:33:18 +00:00
|
|
|
--add-flags "$out/share/${pname}-${version}/bazarr.py" \
|
|
|
|
--suffix PATH : ${lib.makeBinPath [ unrar ffmpeg ]}
|
2020-05-29 06:06:01 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
passthru.tests = {
|
|
|
|
smoke-test = nixosTests.bazarr;
|
|
|
|
};
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Subtitle manager for Sonarr and Radarr";
|
|
|
|
homepage = "https://www.bazarr.media/";
|
2021-03-20 04:20:00 +00:00
|
|
|
license = licenses.gpl3Only;
|
2021-08-08 23:34:03 +00:00
|
|
|
maintainers = with maintainers; [ d-xo ];
|
2020-05-29 06:06:01 +00:00
|
|
|
platforms = platforms.all;
|
|
|
|
};
|
|
|
|
}
|