2024-07-27 06:49:29 +00:00
|
|
|
{
|
|
|
|
stdenv,
|
|
|
|
lib,
|
|
|
|
fetchFromGitHub,
|
|
|
|
buildPerlPackage,
|
|
|
|
shortenPerlShebang,
|
|
|
|
LWP,
|
|
|
|
LWPProtocolHttps,
|
|
|
|
DataDump,
|
|
|
|
JSON,
|
|
|
|
gitUpdater,
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPerlPackage rec {
|
|
|
|
pname = "WWW-YoutubeViewer";
|
2024-07-27 06:49:29 +00:00
|
|
|
version = "3.11.2";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2024-07-27 06:49:29 +00:00
|
|
|
owner = "trizen";
|
|
|
|
repo = "youtube-viewer";
|
|
|
|
rev = version;
|
|
|
|
sha256 = "9Z4fv2B0AnwtYsp7h9phnRMmHtBOMObIJvK8DmKQRxs=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
nativeBuildInputs = lib.optional stdenv.isDarwin shortenPerlShebang;
|
2020-04-24 23:36:52 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
LWP
|
|
|
|
LWPProtocolHttps
|
|
|
|
DataDump
|
|
|
|
JSON
|
|
|
|
];
|
2021-02-05 17:12:51 +00:00
|
|
|
postInstall = lib.optionalString stdenv.isDarwin ''
|
2020-04-24 23:36:52 +00:00
|
|
|
shortenPerlShebang $out/bin/youtube-viewer
|
|
|
|
'';
|
|
|
|
|
2024-07-27 06:49:29 +00:00
|
|
|
passthru.updateScript = gitUpdater { };
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Lightweight application for searching and streaming videos from YouTube";
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/trizen/youtube-viewer";
|
2021-02-05 17:12:51 +00:00
|
|
|
license = with licenses; [ artistic2 ];
|
2022-06-26 10:26:21 +00:00
|
|
|
maintainers = with maintainers; [ woffs ];
|
|
|
|
mainProgram = "youtube-viewer";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|