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