2021-05-03 20:48:10 +00:00
|
|
|
{ lib, fetchFromGitHub, atomicparsley, flvstreamer, ffmpeg, makeWrapper, perl, perlPackages, rtmpdump}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
with lib;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
perlPackages.buildPerlPackage rec {
|
|
|
|
pname = "get_iplayer";
|
2021-05-03 20:48:10 +00:00
|
|
|
version = "3.27";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "get-iplayer";
|
|
|
|
repo = "get_iplayer";
|
|
|
|
rev = "v${version}";
|
2021-05-03 20:48:10 +00:00
|
|
|
sha256 = "077y31gg020wjpx5pcivqgkqawcjxh5kjnvq97x2gd7i3wwc30qi";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
buildInputs = [ perl ];
|
|
|
|
propagatedBuildInputs = with perlPackages; [
|
|
|
|
HTMLParser HTTPCookies LWP LWPProtocolHttps XMLLibXML XMLSimple
|
|
|
|
];
|
|
|
|
|
|
|
|
preConfigure = "touch Makefile.PL";
|
|
|
|
doCheck = false;
|
|
|
|
outputs = [ "out" "man" ];
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/bin $out/share/man/man1
|
|
|
|
cp get_iplayer $out/bin
|
2021-05-03 20:48:10 +00:00
|
|
|
wrapProgram $out/bin/get_iplayer --suffix PATH : ${makeBinPath [ atomicparsley ffmpeg flvstreamer rtmpdump ]} --prefix PERL5LIB : $PERL5LIB
|
2020-04-24 23:36:52 +00:00
|
|
|
cp get_iplayer.1 $out/share/man/man1
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Downloads TV and radio from BBC iPlayer";
|
|
|
|
license = licenses.gpl3Plus;
|
|
|
|
homepage = "https://squarepenguin.co.uk/";
|
|
|
|
platforms = platforms.all;
|
|
|
|
maintainers = with maintainers; [ rika ];
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|