2021-01-17 18:11:59 +00:00
|
|
|
{ stdenv, lib, fetchFromGitHub, buildPerlPackage, shortenPerlShebang, LWP, LWPProtocolHttps, DataDump, JSON }:
|
2019-10-21 20:59:52 +01:00
|
|
|
|
|
|
|
buildPerlPackage rec {
|
|
|
|
pname = "WWW-YoutubeViewer";
|
2020-09-25 15:31:16 +01:00
|
|
|
version = "3.7.9";
|
2019-10-21 20:59:52 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "trizen";
|
|
|
|
repo = "youtube-viewer";
|
|
|
|
rev = version;
|
2020-09-25 15:31:16 +01:00
|
|
|
sha256 = "16p0sa91h0zpqdpqmy348g6b9qj5f6qrbzrljn157vk00cg6mx18";
|
2019-10-21 20:59:52 +01:00
|
|
|
};
|
|
|
|
|
2021-01-17 18:11:59 +00:00
|
|
|
nativeBuildInputs = lib.optional stdenv.isDarwin shortenPerlShebang;
|
2019-10-21 20:59:52 +01:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
LWP
|
|
|
|
LWPProtocolHttps
|
|
|
|
DataDump
|
|
|
|
JSON
|
|
|
|
];
|
2021-01-17 18:11:59 +00:00
|
|
|
postInstall = lib.optionalString stdenv.isDarwin ''
|
2019-10-21 20:59:52 +01:00
|
|
|
shortenPerlShebang $out/bin/youtube-viewer
|
|
|
|
'';
|
|
|
|
|
2021-01-17 18:11:59 +00:00
|
|
|
meta = with lib; {
|
2019-10-21 20:59:52 +01:00
|
|
|
description = "A lightweight application for searching and streaming videos from YouTube";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://github.com/trizen/youtube-viewer";
|
2021-01-17 18:11:59 +00:00
|
|
|
maintainers = with maintainers; [ woffs ];
|
|
|
|
license = with licenses; [ artistic2 ];
|
2019-10-21 20:59:52 +01:00
|
|
|
};
|
|
|
|
}
|