diff options
author | Robert Helgesson <robert@rycee.net> | 2015-01-01 16:34:58 +0100 |
---|---|---|
committer | Robert Helgesson <robert@rycee.net> | 2015-01-03 10:43:09 +0100 |
commit | 3c78e7a3e5f96cd5a3c5e32f030f31e1d8b12c4a (patch) | |
tree | b31a4b4d77c97f25693d3ee09f725c3493b0984f /pkgs/tools/misc/svtplay-dl | |
parent | 597373bbd5ca3237f3b198c150cf7dbb63183fb1 (diff) | |
download | nixlib-3c78e7a3e5f96cd5a3c5e32f030f31e1d8b12c4a.tar nixlib-3c78e7a3e5f96cd5a3c5e32f030f31e1d8b12c4a.tar.gz nixlib-3c78e7a3e5f96cd5a3c5e32f030f31e1d8b12c4a.tar.bz2 nixlib-3c78e7a3e5f96cd5a3c5e32f030f31e1d8b12c4a.tar.lz nixlib-3c78e7a3e5f96cd5a3c5e32f030f31e1d8b12c4a.tar.xz nixlib-3c78e7a3e5f96cd5a3c5e32f030f31e1d8b12c4a.tar.zst nixlib-3c78e7a3e5f96cd5a3c5e32f030f31e1d8b12c4a.zip |
Add package 'svtplay-dl'.
Diffstat (limited to 'pkgs/tools/misc/svtplay-dl')
-rw-r--r-- | pkgs/tools/misc/svtplay-dl/default.nix | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/pkgs/tools/misc/svtplay-dl/default.nix b/pkgs/tools/misc/svtplay-dl/default.nix new file mode 100644 index 000000000000..60f012d01e20 --- /dev/null +++ b/pkgs/tools/misc/svtplay-dl/default.nix @@ -0,0 +1,42 @@ +{ stdenv, fetchurl, makeWrapper, python, perl, zip +, rtmpdump, nose, mock, pycrypto, substituteAll }: + +stdenv.mkDerivation rec { + name = "svtplay-dl-${version}"; + version = "0.10.2014.12.26"; + + src = fetchurl { + url = "https://github.com/spaam/svtplay-dl/archive/${version}.tar.gz"; + sha256 = "0zz57n4zjgj9wcbawwi8drqyxf7myhlz2x3a7vzc5ccaz66fl9ps"; + }; + + pythonPaths = [ pycrypto ]; + buildInputs = [ python perl nose mock rtmpdump makeWrapper ] ++ pythonPaths; + nativeBuildInputs = [ zip ]; + + postPatch = '' + substituteInPlace lib/svtplay_dl/fetcher/rtmp.py \ + --replace '"rtmpdump"' '"${rtmpdump}/bin/rtmpdump"' + + substituteInPlace run-tests.sh \ + --replace 'PYTHONPATH=lib' 'PYTHONPATH=lib:$PYTHONPATH' + ''; + + makeFlags = "PREFIX=$(out) SYSCONFDIR=$(out)/etc PYTHON=${python}/bin/python"; + + postInstall = '' + wrapProgram "$out/bin/svtplay-dl" \ + --prefix PYTHONPATH : "$PYTHONPATH" + ''; + + doCheck = true; + checkPhase = "sh 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 ]; + }; +} |