mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-20 03:43:45 +00:00
Merge pull request #5557 from rycee/package/svtplay-dl
Add package 'svtplay-dl'.
This commit is contained in:
commit
03a57c7d9d
42
pkgs/tools/misc/svtplay-dl/default.nix
Normal file
42
pkgs/tools/misc/svtplay-dl/default.nix
Normal file
@ -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 ];
|
||||
};
|
||||
}
|
@ -2519,6 +2519,10 @@ let
|
||||
|
||||
svnfs = callPackage ../tools/filesystems/svnfs { };
|
||||
|
||||
svtplay-dl = callPackage ../tools/misc/svtplay-dl {
|
||||
inherit (pythonPackages) nose mock;
|
||||
};
|
||||
|
||||
sysbench = callPackage ../development/tools/misc/sysbench {};
|
||||
|
||||
system_config_printer = callPackage ../tools/misc/system-config-printer {
|
||||
|
Loading…
Reference in New Issue
Block a user