nixpkgs/pkgs/by-name/ge/get_iplayer/package.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

57 lines
1.4 KiB
Nix
Raw Normal View History

2023-08-20 17:49:13 +01:00
{ lib
, perlPackages
, fetchFromGitHub
, makeWrapper
, stdenv
, shortenPerlShebang
, perl
, atomicparsley
, ffmpeg
}:
2017-03-23 01:27:43 +00:00
perlPackages.buildPerlPackage rec {
pname = "get_iplayer";
2024-01-15 11:33:34 +00:00
version = "3.35";
2017-03-23 01:27:43 +00:00
src = fetchFromGitHub {
owner = "get-iplayer";
repo = "get_iplayer";
rev = "v${version}";
2024-01-15 11:33:34 +00:00
hash = "sha256-fqzrgmtqy7dlmGEaTXAqpdt9HqZCVooJ0Vf6/JUKihw=";
2017-03-23 01:27:43 +00:00
};
2023-08-20 17:49:13 +01:00
nativeBuildInputs = [ makeWrapper ] ++ lib.optional stdenv.hostPlatform.isDarwin shortenPerlShebang;
buildInputs = [ perl ];
2019-12-28 20:08:33 +00:00
propagatedBuildInputs = with perlPackages; [
LWP LWPProtocolHttps XMLLibXML Mojolicious
2019-12-28 20:08:33 +00:00
];
preConfigure = "touch Makefile.PL";
doCheck = false;
outputs = [ "out" "man" ];
installPhase = ''
2023-08-20 17:49:13 +01:00
runHook preInstall
2023-10-15 21:28:18 +01:00
2023-11-05 13:48:29 +00:00
install -D get_iplayer -t $out/bin
wrapProgram $out/bin/get_iplayer --suffix PATH : ${lib.makeBinPath [ atomicparsley ffmpeg ]} --prefix PERL5LIB : $PERL5LIB
2024-01-15 11:33:34 +00:00
install -Dm444 get_iplayer.1 -t $out/share/man/man1
2023-10-15 21:28:18 +01:00
2023-08-20 17:49:13 +01:00
runHook postInstall
'';
2023-08-20 17:49:13 +01:00
postInstall = lib.optionalString stdenv.hostPlatform.isDarwin ''
shortenPerlShebang $out/bin/.get_iplayer-wrapped
'';
meta = with lib; {
description = "Downloads TV and radio programmes from BBC iPlayer and BBC Sounds";
mainProgram = "get_iplayer";
2017-03-23 01:27:43 +00:00
license = licenses.gpl3Plus;
homepage = "https://github.com/get-iplayer/get_iplayer";
2017-03-23 01:27:43 +00:00
platforms = platforms.all;
maintainers = with maintainers; [ rika chewblacka ];
};
}