about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/perl-modules/WWW-YoutubeViewer/default.nix
blob: 6a3ed466e8f7e8587527a81e16eb3c8cfcd13d52 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
{ stdenv, fetchFromGitHub, buildPerlPackage, shortenPerlShebang, LWP, LWPProtocolHttps, DataDump, JSON }:

buildPerlPackage rec {
  pname = "WWW-YoutubeViewer";
  version = "3.3.0";

  src = fetchFromGitHub {
    owner  = "trizen";
    repo   = "youtube-viewer";
    rev    = version;
    sha256 = "15xyrwv08fw8jmpydwzks26ipxnzliwddgyjcfqiaj0p7lwlhmx1";
  };

  nativeBuildInputs = stdenv.lib.optional stdenv.isDarwin shortenPerlShebang;
  propagatedBuildInputs = [
    LWP
    LWPProtocolHttps
    DataDump
    JSON
  ];
  postInstall = stdenv.lib.optionalString stdenv.isDarwin ''
    shortenPerlShebang $out/bin/youtube-viewer
  '';

  meta = {
    description = "A lightweight application for searching and streaming videos from YouTube";
    homepage = https://github.com/trizen/youtube-viewer;
    maintainers = with stdenv.lib.maintainers; [ woffs ];
    license = with stdenv.lib.licenses; [ artistic2 ];
  };
}