Merge pull request #148091 from rvl/update-restream

This commit is contained in:
Sandro 2021-12-05 06:17:53 +01:00 committed by GitHub
commit 4e7f6d3e17
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -5,22 +5,21 @@
, ffmpeg-full , ffmpeg-full
, fetchFromGitHub , fetchFromGitHub
, openssh , openssh
, netcat
, makeWrapper , makeWrapper
}: }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "restream"; pname = "restream";
version = "1.1"; version = "1.2.0";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "rien"; owner = "rien";
repo = pname; repo = pname;
rev = version; rev = version;
sha256 = "18z17chl7r5dg12xmr3f9gbgv97nslm8nijigd03iysaj6dhymp3"; sha256 = "0vyj0kng8c9inv2rbw1qdr43ic15s5x8fvk9mbw0vpc6g723x99g";
}; };
nativeBuildInputs = [ makeWrapper ];
dontConfigure = true; dontConfigure = true;
dontBuild = true; dontBuild = true;
@ -33,10 +32,22 @@ stdenv.mkDerivation rec {
runHook postInstall runHook postInstall
''; '';
postInstall = '' postInstall = let
# `ffmpeg-full` is used here to bring in `ffplay`, which is used to display deps = [
# the reMarkable framebuffer # `ffmpeg-full` is used here to bring in `ffplay`, which is used
wrapProgram "$out/bin/restream" --suffix PATH ":" "${lib.makeBinPath [ ffmpeg-full lz4 openssh ]}" # to display the reMarkable framebuffer
ffmpeg-full
lz4
openssh
# Libressl netcat brings in `nc` which used for --uncompressed mode.
netcat
];
in ''
# This `sed` command has the same effect as `wrapProgram`, except
# without .restream-wrapped store paths appearing everywhere.
sed -i \
'2i export PATH=$PATH''${PATH:+':'}${lib.makeBinPath deps}' \
"$out/bin/restream"
''; '';
meta = with lib; { meta = with lib; {