bazarr: fix build

This commit is contained in:
Andrei Pampu 2021-08-01 14:38:44 +03:00
parent ab5b6828af
commit 3fc1cc5c03
No known key found for this signature in database
GPG Key ID: E49BA299263D4E23

View File

@ -1,25 +1,28 @@
{ stdenv, lib, fetchurl, makeWrapper, python3, unrar, ffmpeg, nixosTests }:
{ stdenv, lib, fetchurl, makeWrapper, unzip, python3, unrar, ffmpeg, nixosTests }:
stdenv.mkDerivation rec {
pname = "bazarr";
version = "0.9.6";
sourceRoot = ".";
src = fetchurl {
url = "https://github.com/morpheus65535/bazarr/archive/v${version}.tar.gz";
sha256 = "sha256-aO9PIE/YlSIGEcntDCdxIYuuvV5jG266ldhC2QfT+e4=";
url = "https://github.com/morpheus65535/bazarr/releases/download/v${version}/bazarr.zip";
sha256 = "sha256-ZSQzDlObnv5DEra2+YgXhox583KPyGIjia0SJyTUPWo=";
};
nativeBuildInputs = [ makeWrapper ];
nativeBuildInputs = [ unzip makeWrapper ];
installPhase = ''
mkdir -p $out/src
cp -r * $out/src
mkdir -p $out/bin
makeWrapper "${(python3.withPackages (ps: [ps.lxml ps.numpy])).interpreter}" \
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/src/bazarr.py" \
--suffix PATH : ${lib.makeBinPath [ unrar ffmpeg ]} \
--add-flags "$out/share/${pname}-${version}/bazarr.py" \
--suffix PATH : ${lib.makeBinPath [ unrar ffmpeg ]}
'';
passthru.tests = {