nixpkgs/pkgs/servers/bazarr/default.nix

37 lines
968 B
Nix
Raw Normal View History

2021-03-25 10:17:59 +00:00
{ stdenv, lib, fetchurl, makeWrapper, python3, unrar, ffmpeg, nixosTests }:
2020-05-10 10:26:22 +00:00
stdenv.mkDerivation rec {
pname = "bazarr";
2021-05-09 00:49:10 +00:00
version = "0.9.5";
2020-05-10 10:26:22 +00:00
src = fetchurl {
url = "https://github.com/morpheus65535/bazarr/archive/v${version}.tar.gz";
2021-05-09 00:49:10 +00:00
sha256 = "sha256-N0HoZgAtWPgYPU9OWpMEXO2qUoNIGCsFn9vll0hLal0=";
2020-05-10 10:26:22 +00: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 10:26:22 +00:00
$out/bin/bazarr \
--add-flags "$out/src/bazarr.py" \
2021-03-25 10:17:59 +00:00
--suffix PATH : ${lib.makeBinPath [ unrar ffmpeg ]} \
2020-05-10 10:26:22 +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-25 10:17:59 +00:00
license = licenses.gpl3Only;
2020-05-10 10:26:22 +00:00
maintainers = with maintainers; [ xwvvvvwx ];
platforms = platforms.all;
};
}