5aa4b19946
Refs: e6754980264fe927320d5ff2dbd24ca4fac9a160 1e9cc5b9844ef603fe160e9f671178f96200774f 793a2fe1e8bb886ca2096c5904e1193dc3268b6d c19cf65261639f749012454932a532aa7c681e4b f6544d618f30fae0bc4798c4387a8c7c9c047a7c
50 lines
1.3 KiB
Nix
50 lines
1.3 KiB
Nix
{ stdenv, fetchFromGitHub, makeWrapper, python3Packages, perl, zip
|
|
, gitMinimal }:
|
|
|
|
let
|
|
|
|
inherit (python3Packages)
|
|
python nose pycrypto pyyaml requests mock python-dateutil setuptools;
|
|
|
|
in stdenv.mkDerivation rec {
|
|
pname = "svtplay-dl";
|
|
version = "2.4";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "spaam";
|
|
repo = "svtplay-dl";
|
|
rev = version;
|
|
sha256 = "146ss7pzh61yw84crk6hzfxkfdnf6bq07m11b6lgsw4hsn71g59w";
|
|
};
|
|
|
|
pythonPaths = [ pycrypto pyyaml requests ];
|
|
buildInputs = [ python perl nose mock makeWrapper python-dateutil setuptools ] ++ pythonPaths;
|
|
nativeBuildInputs = [ gitMinimal zip ];
|
|
|
|
postPatch = ''
|
|
substituteInPlace scripts/run-tests.sh \
|
|
--replace 'PYTHONPATH=lib' 'PYTHONPATH=lib:$PYTHONPATH'
|
|
'';
|
|
|
|
makeFlags = "PREFIX=$(out) SYSCONFDIR=$(out)/etc PYTHON=${python.interpreter}";
|
|
|
|
postInstall = ''
|
|
wrapProgram "$out/bin/svtplay-dl" \
|
|
--prefix PYTHONPATH : "$PYTHONPATH"
|
|
'';
|
|
|
|
doCheck = true;
|
|
checkPhase = ''
|
|
sh scripts/run-tests.sh -2
|
|
'';
|
|
|
|
meta = with stdenv.lib; {
|
|
homepage = https://github.com/spaam/svtplay-dl;
|
|
description = "Command-line tool to download videos from svtplay.se and other sites";
|
|
license = licenses.mit;
|
|
platforms = stdenv.lib.platforms.linux;
|
|
maintainers = [ maintainers.rycee ];
|
|
broken = true;
|
|
};
|
|
}
|