2016-09-26 10:09:25 +01:00
|
|
|
{ stdenv, lib, fetchFromGitHub, pythonPackages, makeWrapper, ffmpeg_3 }:
|
2016-03-27 08:08:23 +01:00
|
|
|
|
2019-08-13 22:52:01 +01:00
|
|
|
pythonPackages.buildPythonApplication {
|
2016-03-27 08:08:23 +01:00
|
|
|
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "togglesg-download-git";
|
2017-12-14 16:27:51 +00:00
|
|
|
version = "2017-12-07";
|
2016-03-27 08:08:23 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2017-12-14 16:27:51 +00:00
|
|
|
owner = "0x776b7364";
|
|
|
|
repo = "toggle.sg-download";
|
|
|
|
rev = "e64959f99ac48920249987a644eefceee923282f";
|
|
|
|
sha256 = "0j317wmyzpwfcixjkybbq2vkg52vij21bs40zg3n1bs61rgmzrn8";
|
2016-03-27 08:08:23 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
|
|
|
|
doCheck = false;
|
|
|
|
dontBuild = true;
|
|
|
|
dontStrip = true;
|
|
|
|
|
|
|
|
installPhase = ''
|
2017-12-14 16:27:51 +00:00
|
|
|
runHook preInstall
|
|
|
|
|
|
|
|
mkdir -p $out/{bin,share/doc/togglesg-download}
|
2016-06-21 08:33:38 +01:00
|
|
|
substitute $src/download_toggle_video2.py $out/bin/download_toggle_video2.py \
|
|
|
|
--replace "ffmpeg_download_cmd = 'ffmpeg" "ffmpeg_download_cmd = '${lib.getBin ffmpeg_3}/bin/ffmpeg"
|
|
|
|
chmod 0755 $out/bin/download_toggle_video2.py
|
2017-12-14 16:27:51 +00:00
|
|
|
|
|
|
|
cp LICENSE README.md $out/share/doc/togglesg-download
|
|
|
|
|
|
|
|
runHook postInstall
|
2016-03-27 08:08:23 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://github.com/0x776b7364/toggle.sg-download";
|
2016-03-27 08:08:23 +01:00
|
|
|
description = "Command-line tool to download videos from toggle.sg written in Python";
|
|
|
|
longDescription = ''
|
|
|
|
toggle.sg requires SilverLight in order to view videos. This tool will
|
|
|
|
allow you to download the video files for viewing in your media player and
|
|
|
|
on your OS of choice.
|
|
|
|
'';
|
|
|
|
license = licenses.mit;
|
2017-12-14 16:27:51 +00:00
|
|
|
maintainers = with maintainers; [ peterhoeg ];
|
2016-03-27 08:08:23 +01:00
|
|
|
platforms = platforms.all;
|
|
|
|
};
|
|
|
|
}
|