uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead
https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948 this can do it nicely. Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
commit
56de2bcd43
30691 changed files with 3076956 additions and 0 deletions
60
pkgs/tools/misc/svtplay-dl/default.nix
Normal file
60
pkgs/tools/misc/svtplay-dl/default.nix
Normal file
|
|
@ -0,0 +1,60 @@
|
|||
{ lib, stdenv, fetchFromGitHub, makeWrapper, python3Packages, perl, zip
|
||||
, gitMinimal, ffmpeg }:
|
||||
|
||||
let
|
||||
|
||||
inherit (python3Packages)
|
||||
python pytest nose cryptography pyyaml requests mock requests-mock
|
||||
python-dateutil setuptools;
|
||||
|
||||
in stdenv.mkDerivation rec {
|
||||
pname = "svtplay-dl";
|
||||
version = "4.12";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "spaam";
|
||||
repo = "svtplay-dl";
|
||||
rev = version;
|
||||
sha256 = "0vkrbizfgchnzinyyl5ppmbqs156j6mmy1gqxj41d3082w1gqr09";
|
||||
};
|
||||
|
||||
pythonPaths = [ cryptography pyyaml requests ];
|
||||
buildInputs = [ python perl python-dateutil setuptools ] ++ pythonPaths;
|
||||
nativeBuildInputs = [ gitMinimal zip makeWrapper ];
|
||||
checkInputs = [ nose pytest mock requests-mock ];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace scripts/run-tests.sh \
|
||||
--replace 'PYTHONPATH=lib' 'PYTHONPATH=lib:$PYTHONPATH'
|
||||
|
||||
sed -i '/def test_sublang2\?(/ i\ @unittest.skip("accesses network")' \
|
||||
lib/svtplay_dl/tests/test_postprocess.py
|
||||
'';
|
||||
|
||||
makeFlags = [ "PREFIX=$(out)" "SYSCONFDIR=$(out)/etc" "PYTHON=${python.interpreter}" ];
|
||||
|
||||
postInstall = ''
|
||||
wrapProgram "$out/bin/svtplay-dl" \
|
||||
--prefix PATH : "${ffmpeg}" \
|
||||
--prefix PYTHONPATH : "$PYTHONPATH"
|
||||
'';
|
||||
|
||||
doCheck = true;
|
||||
checkPhase = ''
|
||||
sh scripts/run-tests.sh -2
|
||||
'';
|
||||
|
||||
doInstallCheck = true;
|
||||
installCheckPhase = ''
|
||||
runHook preInstallCheck
|
||||
$out/bin/svtplay-dl --help > /dev/null
|
||||
runHook postInstallCheck
|
||||
'';
|
||||
|
||||
meta = with 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 = lib.platforms.unix;
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue