nixpkgs-suyu/pkgs/servers/bazarr/default.nix

37 lines
969 B
Nix
Raw Normal View History

2021-03-25 11:17:59 +01:00
{ stdenv, lib, fetchurl, makeWrapper, python3, unrar, ffmpeg, nixosTests }:
2020-05-10 12:26:22 +02:00
stdenv.mkDerivation rec {
pname = "bazarr";
2021-04-25 21:43:59 +02:00
version = "0.9.4";
2020-05-10 12:26:22 +02:00
src = fetchurl {
url = "https://github.com/morpheus65535/bazarr/archive/v${version}.tar.gz";
2021-04-25 21:43:59 +02:00
sha256 = "1qnzjqpwsvanfhd1yn5789yx4d3ijk9983llm0w5xnjz6rmcxrw5";
2020-05-10 12:26:22 +02:00
};
nativeBuildInputs = [ makeWrapper ];
installPhase = ''
mkdir -p $out/src
cp -r * $out/src
mkdir -p $out/bin
makeWrapper "${(python3.withPackages (ps: [ps.lxml ps.numpy])).interpreter}" \
2020-05-10 12:26:22 +02:00
$out/bin/bazarr \
--add-flags "$out/src/bazarr.py" \
2021-03-25 11:17:59 +01:00
--suffix PATH : ${lib.makeBinPath [ unrar ffmpeg ]} \
2020-05-10 12:26:22 +02:00
'';
passthru.tests = {
smoke-test = nixosTests.bazarr;
};
meta = with lib; {
description = "Subtitle manager for Sonarr and Radarr";
homepage = "https://www.bazarr.media/";
2021-03-25 11:17:59 +01:00
license = licenses.gpl3Only;
2020-05-10 12:26:22 +02:00
maintainers = with maintainers; [ xwvvvvwx ];
platforms = platforms.all;
};
}