mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-08 14:03:29 +00:00
571c71e6f7
We are migrating packages that meet below requirements: 1. using `callPackage` 2. called path is a directory 3. overriding set is empty (`{ }`) 4. not containing path expressions other than relative path (to makenixpkgs-vet happy) 5. not referenced by nix files outside of the directory, other than`pkgs/top-level/all-packages.nix` 6. not referencing nix files outside of the directory 7. not referencing `default.nix` (since it's changed to `package.nix`) 8. `outPath` doesn't change after migration The tool is here: https://github.com/Aleksanaa/by-name-migrate.
57 lines
1.4 KiB
Nix
57 lines
1.4 KiB
Nix
{ lib
|
|
, perlPackages
|
|
, fetchFromGitHub
|
|
, makeWrapper
|
|
, stdenv
|
|
, shortenPerlShebang
|
|
, perl
|
|
, atomicparsley
|
|
, ffmpeg
|
|
}:
|
|
|
|
perlPackages.buildPerlPackage rec {
|
|
pname = "get_iplayer";
|
|
version = "3.35";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "get-iplayer";
|
|
repo = "get_iplayer";
|
|
rev = "v${version}";
|
|
hash = "sha256-fqzrgmtqy7dlmGEaTXAqpdt9HqZCVooJ0Vf6/JUKihw=";
|
|
};
|
|
|
|
nativeBuildInputs = [ makeWrapper ] ++ lib.optional stdenv.hostPlatform.isDarwin shortenPerlShebang;
|
|
buildInputs = [ perl ];
|
|
propagatedBuildInputs = with perlPackages; [
|
|
LWP LWPProtocolHttps XMLLibXML Mojolicious
|
|
];
|
|
|
|
preConfigure = "touch Makefile.PL";
|
|
doCheck = false;
|
|
outputs = [ "out" "man" ];
|
|
|
|
installPhase = ''
|
|
runHook preInstall
|
|
|
|
install -D get_iplayer -t $out/bin
|
|
wrapProgram $out/bin/get_iplayer --suffix PATH : ${lib.makeBinPath [ atomicparsley ffmpeg ]} --prefix PERL5LIB : $PERL5LIB
|
|
install -Dm444 get_iplayer.1 -t $out/share/man/man1
|
|
|
|
runHook postInstall
|
|
'';
|
|
|
|
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";
|
|
license = licenses.gpl3Plus;
|
|
homepage = "https://github.com/get-iplayer/get_iplayer";
|
|
platforms = platforms.all;
|
|
maintainers = with maintainers; [ rika chewblacka ];
|
|
};
|
|
|
|
}
|