2017-03-23 02:27:43 +01:00
|
|
|
{stdenv, fetchFromGitHub, atomicparsley, flvstreamer, ffmpeg, makeWrapper, perl, buildPerlPackage, perlPackages, rtmpdump}:
|
|
|
|
|
|
|
|
with stdenv.lib;
|
|
|
|
|
2016-10-07 00:17:43 +02:00
|
|
|
buildPerlPackage rec {
|
|
|
|
name = "get_iplayer-${version}";
|
2017-03-23 02:27:43 +01:00
|
|
|
version = "2.99";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "get-iplayer";
|
|
|
|
repo = "get_iplayer";
|
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "085bgwkjnaqp96gvd2s8qmkw69rz91si1sgzqdqbplkzj9bk2qii";
|
|
|
|
};
|
2011-08-30 02:14:16 +02:00
|
|
|
|
2017-03-23 02:27:43 +01:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
buildInputs = [ perl ];
|
2016-10-07 00:17:43 +02:00
|
|
|
propagatedBuildInputs = with perlPackages; [HTMLParser HTTPCookies LWP XMLLibXML XMLSimple];
|
2013-06-29 20:50:44 +02:00
|
|
|
|
|
|
|
preConfigure = "touch Makefile.PL";
|
|
|
|
doCheck = false;
|
2016-04-18 10:49:20 +02:00
|
|
|
outputs = [ "out" "man" ];
|
2011-08-30 02:14:16 +02:00
|
|
|
|
2016-10-07 00:17:43 +02:00
|
|
|
installPhase = ''
|
2016-04-18 10:49:20 +02:00
|
|
|
mkdir -p $out/bin $out/share/man/man1
|
2011-08-30 02:14:16 +02:00
|
|
|
cp get_iplayer $out/bin
|
2017-03-23 02:27:43 +01:00
|
|
|
wrapProgram $out/bin/get_iplayer --suffix PATH : ${makeBinPath [ atomicparsley ffmpeg flvstreamer rtmpdump ]} --prefix PERL5LIB : $PERL5LIB
|
2016-04-18 10:49:20 +02:00
|
|
|
cp get_iplayer.1 $out/share/man/man1
|
|
|
|
'';
|
2016-10-07 00:17:43 +02:00
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Downloads TV and radio from BBC iPlayer";
|
2017-03-23 02:27:43 +01:00
|
|
|
license = licenses.gpl3Plus;
|
2016-10-07 00:17:43 +02:00
|
|
|
homepage = https://squarepenguin.co.uk/;
|
2017-03-23 02:27:43 +01:00
|
|
|
platforms = platforms.all;
|
2011-08-30 02:14:16 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|