1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, isPyPy
5, makeWrapper
6, rtmpdump
7, pycrypto
8, requests
9}:
10
11buildPythonPackage rec {
12 pname = "livestreamer";
13 version = "1.12.2";
14 disabled = isPyPy;
15
16 src = fetchFromGitHub {
17 owner = "chrippa";
18 repo = "livestreamer";
19 rev = "v${version}";
20 hash = "sha256-PqqyBh+oMmu7Ynly3fqx/+6mQYX+6SpI0Okj2O+YLz0=";
21 };
22
23 nativeBuildInputs = [ makeWrapper ];
24
25 propagatedBuildInputs = [ rtmpdump pycrypto requests ];
26
27 postInstall = ''
28 wrapProgram $out/bin/livestreamer --prefix PATH : ${lib.makeBinPath [ rtmpdump ]}
29 '';
30
31 meta = with lib; {
32 homepage = "http://livestreamer.tanuki.se";
33 description = "Livestreamer is CLI program that extracts streams from various services and pipes them into a video player of choice";
34 license = licenses.bsd2;
35 maintainers = with maintainers; [ ];
36 };
37
38}