summary refs log tree commit diff
path: root/pkgs/development/python-modules/livestreamer/default.nix
blob: 7ae9124bb82cb9ad7c853aa08f386deb9c7024b3 (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
32
33
34
35
36
37
38
39
40
41
{ lib, stdenv
, buildPythonPackage
, pkgs
, isPyPy
, pycrypto
, requests
, singledispatch
, futures
, isPy27
}:

buildPythonPackage rec {
  version = "1.12.2";
  pname = "livestreamer";
  disabled = isPyPy;

  src = pkgs.fetchurl {
    url = "https://github.com/chrippa/livestreamer/archive/v${version}.tar.gz";
    sha256 = "1fp3d3z2grb1ls97smjkraazpxnvajda2d1g1378s6gzmda2jvjd";
  };

  buildInputs = [ pkgs.makeWrapper ];

  propagatedBuildInputs = [ pkgs.rtmpdump pycrypto requests ]
    ++ lib.optionals isPy27 [ singledispatch futures ];

  postInstall = ''
    wrapProgram $out/bin/livestreamer --prefix PATH : ${pkgs.rtmpdump}/bin
  '';

  meta = with lib; {
    homepage = "http://livestreamer.tanuki.se";
    description = ''
      Livestreamer is CLI program that extracts streams from various
      services and pipes them into a video player of choice.
    '';
    license = licenses.bsd2;
    maintainers = with maintainers; [ ];
  };

}