tvheadend: fix version detection and wrap bzip2 to support backups
This commit is contained in:
parent
06d7e54d62
commit
af0c3fca1d
@ -1,21 +1,27 @@
|
|||||||
{avahi, cmake, dbus, fetchurl, gettext, git, gnutar, gzip, bzip2, ffmpeg, libiconv, openssl, pkgconfig, python
|
{ stdenv, fetchFromGitHub, cmake, makeWrapper, pkgconfig
|
||||||
, stdenv, which, zlib}:
|
, avahi, dbus, gettext, git, gnutar, gzip, bzip2, ffmpeg, libiconv, openssl, python
|
||||||
|
, which, zlib }:
|
||||||
|
|
||||||
with stdenv.lib;
|
let
|
||||||
|
version = "4.2.1";
|
||||||
|
|
||||||
let version = "4.2.1";
|
in stdenv.mkDerivation rec {
|
||||||
pkgName = "tvheadend";
|
name = "tvheadend-${version}";
|
||||||
|
|
||||||
in
|
src = fetchFromGitHub {
|
||||||
|
owner = "tvheadend";
|
||||||
stdenv.mkDerivation rec {
|
repo = "tvheadend";
|
||||||
name = "${pkgName}-${version}";
|
rev = "v${version}";
|
||||||
|
sha256 = "1lhk8psvifmn4kjwyfxjj21z0apyr59zizzsfd4j22v7bk66rrl9";
|
||||||
src = fetchurl {
|
|
||||||
url = "https://github.com/tvheadend/tvheadend/archive/v${version}.tar.gz";
|
|
||||||
sha256 = "1wrj3w595c1hfl2vmfdmp5qncy5samqi7iisyq76jf3nlzgw6dvn";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
buildInputs = [
|
||||||
|
avahi dbus gettext git gnutar gzip bzip2 ffmpeg libiconv openssl python
|
||||||
|
which zlib
|
||||||
|
];
|
||||||
|
|
||||||
|
nativeBuildInputs = [ cmake makeWrapper pkgconfig ];
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
# disable dvbscan, as having it enabled causes a network download which
|
# disable dvbscan, as having it enabled causes a network download which
|
||||||
@ -28,20 +34,24 @@ stdenv.mkDerivation rec {
|
|||||||
"--disable-hdhomerun_static"
|
"--disable-hdhomerun_static"
|
||||||
];
|
];
|
||||||
|
|
||||||
buildPhase = "make";
|
|
||||||
|
|
||||||
dontUseCmakeConfigure = true;
|
dontUseCmakeConfigure = true;
|
||||||
|
|
||||||
nativeBuildInputs = [ pkgconfig ];
|
|
||||||
buildInputs = [ avahi dbus cmake gettext git gnutar gzip bzip2 ffmpeg libiconv openssl python
|
|
||||||
which zlib ];
|
|
||||||
|
|
||||||
preConfigure = ''
|
preConfigure = ''
|
||||||
patchShebangs ./configure
|
patchShebangs ./configure
|
||||||
|
|
||||||
substituteInPlace src/config.c --replace /usr/bin/tar ${gnutar}/bin/tar
|
substituteInPlace src/config.c --replace /usr/bin/tar ${gnutar}/bin/tar
|
||||||
|
|
||||||
|
# the version detection script `support/version` reads this file if it
|
||||||
|
# exists, so let's just use that
|
||||||
|
echo ${version} > rpm/version
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = {
|
postInstall = ''
|
||||||
|
wrapProgram $out/bin/tvheadend \
|
||||||
|
--prefix PATH : ${stdenv.lib.makeBinPath [ bzip2 ]}
|
||||||
|
'';
|
||||||
|
|
||||||
|
meta = with stdenv.lib; {
|
||||||
description = "TV streaming server";
|
description = "TV streaming server";
|
||||||
longDescription = ''
|
longDescription = ''
|
||||||
Tvheadend is a TV streaming server and recorder for Linux, FreeBSD and Android
|
Tvheadend is a TV streaming server and recorder for Linux, FreeBSD and Android
|
||||||
@ -50,6 +60,6 @@ stdenv.mkDerivation rec {
|
|||||||
homepage = https://tvheadend.org;
|
homepage = https://tvheadend.org;
|
||||||
license = licenses.gpl3;
|
license = licenses.gpl3;
|
||||||
platforms = platforms.unix;
|
platforms = platforms.unix;
|
||||||
maintainers = [ maintainers.simonvandel ];
|
maintainers = with maintainers; [ simonvandel ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user