1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-24 14:41:17 +00:00
nixpkgs/pkgs/servers/bazarr/default.nix
2021-09-14 01:47:47 +00:00

40 lines
1.1 KiB
Nix

{ stdenv, lib, fetchurl, makeWrapper, unzip, python3, unrar, ffmpeg, nixosTests }:
stdenv.mkDerivation rec {
pname = "bazarr";
version = "0.9.9";
sourceRoot = ".";
src = fetchurl {
url = "https://github.com/morpheus65535/bazarr/releases/download/v${version}/bazarr.zip";
sha256 = "sha256-0Qfjo0hazbV5Oi5hDk8/zc1sReRMzhkjkEiLIRiUOtk=";
};
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/";
license = licenses.gpl3Only;
maintainers = with maintainers; [ d-xo ];
platforms = platforms.all;
};
}