14 inherit (python3Packages)
15 python pytest nose cryptography pyyaml requests mock requests-mock
16 python-dateutil setuptools;
22 stdenv.mkDerivation rec {
26 src = fetchFromGitHub {
30 sha256 = "sha256-jfrzgWlEoct8BJLkteWlYjXR/D4J+ShQhsNPBCN+zeQ=";
33 pythonPaths = [ cryptography pyyaml requests ];
34 buildInputs = [ python perl python-dateutil setuptools ] ++ pythonPaths;
35 nativeBuildInputs = [ gitMinimal zip makeWrapper ];
36 checkInputs = [ nose pytest mock requests-mock ];
39 substituteInPlace scripts/run-tests.sh \
40 --replace 'PYTHONPATH=lib' 'PYTHONPATH=lib:$PYTHONPATH'
42 sed -i '/def test_sublang2\?(/ i\ @unittest.skip("accesses network")' \
43 lib/svtplay_dl/tests/test_postprocess.py
46 makeFlags = [ "PREFIX=$(out)" "SYSCONFDIR=$(out)/etc" "PYTHON=${python.interpreter}" ];
49 wrapProgram "$out/bin/svtplay-dl" \
50 --prefix PATH : "${ffmpeg}" \
51 --prefix PYTHONPATH : "$PYTHONPATH"
56 sh scripts/run-tests.sh -2
59 doInstallCheck = true;
60 installCheckPhase = ''
61 runHook preInstallCheck
62 $out/bin/svtplay-dl --help > /dev/null
63 runHook postInstallCheck
67 homepage = "https://github.com/spaam/svtplay-dl";
68 description = "Command-line tool to download videos from svtplay.se and other sites";
69 license = licenses.mit;
70 platforms = lib.platforms.unix;