1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-03 19:15:39 +00:00
nixpkgs/pkgs/servers/bazarr/default.nix

40 lines
1.1 KiB
Nix
Raw Normal View History

2021-08-01 12:38:44 +01:00
{ stdenv, lib, fetchurl, makeWrapper, unzip, python3, unrar, ffmpeg, nixosTests }:
2020-05-10 11:26:22 +01:00
stdenv.mkDerivation rec {
pname = "bazarr";
2021-09-06 02:16:36 +01:00
version = "0.9.8";
2020-05-10 11:26:22 +01:00
2021-08-01 12:38:44 +01:00
sourceRoot = ".";
2020-05-10 11:26:22 +01:00
src = fetchurl {
2021-08-01 12:38:44 +01:00
url = "https://github.com/morpheus65535/bazarr/releases/download/v${version}/bazarr.zip";
2021-09-06 02:16:36 +01:00
sha256 = "sha256-ESmSfor28KIaZ68Sy+YRbumefHDxLZgBQ6XeUSYSR1c=";
2020-05-10 11:26:22 +01:00
};
2021-08-01 12:38:44 +01:00
nativeBuildInputs = [ unzip makeWrapper ];
2020-05-10 11:26:22 +01:00
installPhase = ''
2021-08-01 12:38:44 +01: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-10 11:26:22 +01:00
$out/bin/bazarr \
2021-08-01 12:38:44 +01:00
--add-flags "$out/share/${pname}-${version}/bazarr.py" \
--suffix PATH : ${lib.makeBinPath [ unrar ffmpeg ]}
2020-05-10 11:26:22 +01: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;
2021-08-08 18:11:45 +01:00
maintainers = with maintainers; [ d-xo ];
2020-05-10 11:26:22 +01:00
platforms = platforms.all;
};
}