git.iko.soy/typeable/nixpkgs
on master help sign in
tvheadend: fix version detection and wrap bzip2 to support backups
commitaf0c3fca1de900de881f19a1fae3806ea34427cc authorPeter Hoeg <peter@hoeg.com> dateWed 1 Nov 2017, 17:41 (9 years ago) parent06d7e54
1 file changed+31−21
pkgs/servers/tvheadend/default.nix+31−21
pkgs/servers/tvheadend/default.nix+31−21
@@ -1,20 +1,26 @@
1−{avahi, cmake, dbus, fetchurl, gettext, git, gnutar, gzip, bzip2, ffmpeg, libiconv, openssl, pkgconfig, python
2−, stdenv, which, zlib}:
1+{ stdenv, fetchFromGitHub, cmake, makeWrapper, pkgconfig
2+, avahi, dbus, gettext, git, gnutar, gzip, bzip2, ffmpeg, libiconv, openssl, python
3+, which, zlib }:
34
4−with stdenv.lib;
5+let
6+ version = "4.2.1";
57
6−let version = "4.2.1";
7− pkgName = "tvheadend";
8+in stdenv.mkDerivation rec {
9+ name = "tvheadend-${version}";
810
9−in
11+ src = fetchFromGitHub {
12+ owner = "tvheadend";
13+ repo = "tvheadend";
14+ rev = "v${version}";
15+ sha256 = "1lhk8psvifmn4kjwyfxjj21z0apyr59zizzsfd4j22v7bk66rrl9";
16+ };
1017
11−stdenv.mkDerivation rec {
12− name = "${pkgName}-${version}";
18+ buildInputs = [
19+ avahi dbus gettext git gnutar gzip bzip2 ffmpeg libiconv openssl python
20+ which zlib
21+ ];
1322
14− src = fetchurl {
15− url = "https://github.com/tvheadend/tvheadend/archive/v${version}.tar.gz";
16− sha256 = "1wrj3w595c1hfl2vmfdmp5qncy5samqi7iisyq76jf3nlzgw6dvn";
17− };
23+ nativeBuildInputs = [ cmake makeWrapper pkgconfig ];
1824
1925 enableParallelBuilding = true;
2026
@@ -28,28 +34,32 @@ stdenv.mkDerivation rec {
2834 "--disable-hdhomerun_static"
2935 ];
3036
31− buildPhase = "make";
32−
3337 dontUseCmakeConfigure = true;
3438
35− nativeBuildInputs = [ pkgconfig ];
36− buildInputs = [ avahi dbus cmake gettext git gnutar gzip bzip2 ffmpeg libiconv openssl python
37− which zlib ];
38−
3939 preConfigure = ''
4040 patchShebangs ./configure
41+
4142 substituteInPlace src/config.c --replace /usr/bin/tar ${gnutar}/bin/tar
43+
44+ # the version detection script `support/version` reads this file if it
45+ # exists, so let's just use that
46+ echo ${version} > rpm/version
47+ '';
48+
49+ postInstall = ''
50+ wrapProgram $out/bin/tvheadend \
51+ --prefix PATH : ${stdenv.lib.makeBinPath [ bzip2 ]}
4252 '';
4353
44− meta = {
54+ meta = with stdenv.lib; {
4555 description = "TV streaming server";
4656 longDescription = ''
47− Tvheadend is a TV streaming server and recorder for Linux, FreeBSD and Android
57+ Tvheadend is a TV streaming server and recorder for Linux, FreeBSD and Android
4858 supporting DVB-S, DVB-S2, DVB-C, DVB-T, ATSC, IPTV, SAT>IP and HDHomeRun as input sources.
4959 Tvheadend offers the HTTP (VLC, MPlayer), HTSP (Kodi, Movian) and SAT>IP streaming.'';
5060 homepage = https://tvheadend.org;
5161 license = licenses.gpl3;
5262 platforms = platforms.unix;
53− maintainers = [ maintainers.simonvandel ];
63+ maintainers = with maintainers; [ simonvandel ];
5464 };
5565}