1{ 2 stdenv, 3 lib, 4 fetchFromGitHub, 5 buildPerlPackage, 6 shortenPerlShebang, 7 LWP, 8 LWPProtocolHttps, 9 DataDump, 10 JSON, 11 gitUpdater, 12}: 13 14buildPerlPackage rec { 15 pname = "WWW-YoutubeViewer"; 16 version = "3.11.2"; 17 18 src = fetchFromGitHub { 19 owner = "trizen"; 20 repo = "youtube-viewer"; 21 rev = version; 22 sha256 = "9Z4fv2B0AnwtYsp7h9phnRMmHtBOMObIJvK8DmKQRxs="; 23 }; 24 25 nativeBuildInputs = lib.optional stdenv.hostPlatform.isDarwin shortenPerlShebang; 26 propagatedBuildInputs = [ 27 LWP 28 LWPProtocolHttps 29 DataDump 30 JSON 31 ]; 32 postInstall = lib.optionalString stdenv.hostPlatform.isDarwin '' 33 shortenPerlShebang $out/bin/youtube-viewer 34 ''; 35 36 passthru.updateScript = gitUpdater { }; 37 38 meta = with lib; { 39 description = "Lightweight application for searching and streaming videos from YouTube"; 40 homepage = "https://github.com/trizen/youtube-viewer"; 41 license = with licenses; [ artistic2 ]; 42 maintainers = with maintainers; [ woffs ]; 43 mainProgram = "youtube-viewer"; 44 }; 45}