Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 61 lines 1.4 kB view raw
1{ 2 lib, 3 stdenv, 4 lz4, 5 ffmpeg-full, 6 fetchFromGitHub, 7 openssh, 8 netcat, 9}: 10 11stdenv.mkDerivation rec { 12 pname = "restream"; 13 version = "1.3.1"; 14 15 src = fetchFromGitHub { 16 owner = "rien"; 17 repo = "restream"; 18 rev = "v${version}"; 19 hash = "sha256-AXHKOfdIM3LsHF6u3M/lMhhcuPZADoEal7de3zlx7L4="; 20 }; 21 22 dontConfigure = true; 23 dontBuild = true; 24 25 installPhase = '' 26 runHook preInstall 27 28 install -D ${src}/restream.arm.static $out/libexec/restream.arm.static 29 install -D ${src}/reStream.sh $out/bin/restream 30 31 runHook postInstall 32 ''; 33 34 postInstall = 35 let 36 deps = [ 37 # `ffmpeg-full` is used here to bring in `ffplay`, which is used 38 # to display the reMarkable framebuffer 39 ffmpeg-full 40 lz4 41 openssh 42 # Libressl netcat brings in `nc` which used for --uncompressed mode. 43 netcat 44 ]; 45 in 46 '' 47 # This `sed` command has the same effect as `wrapProgram`, except 48 # without .restream-wrapped store paths appearing everywhere. 49 sed -i \ 50 '2i export PATH=$PATH''${PATH:+':'}${lib.makeBinPath deps}' \ 51 "$out/bin/restream" 52 ''; 53 54 meta = with lib; { 55 description = "reMarkable screen sharing over SSH"; 56 mainProgram = "restream"; 57 homepage = "https://github.com/rien/reStream"; 58 license = licenses.mit; 59 maintainers = [ maintainers.cpcloud ]; 60 }; 61}