mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-07 13:33:12 +00:00
571c71e6f7
We are migrating packages that meet below requirements: 1. using `callPackage` 2. called path is a directory 3. overriding set is empty (`{ }`) 4. not containing path expressions other than relative path (to makenixpkgs-vet happy) 5. not referenced by nix files outside of the directory, other than`pkgs/top-level/all-packages.nix` 6. not referencing nix files outside of the directory 7. not referencing `default.nix` (since it's changed to `package.nix`) 8. `outPath` doesn't change after migration The tool is here: https://github.com/Aleksanaa/by-name-migrate.
59 lines
1.3 KiB
Nix
59 lines
1.3 KiB
Nix
{ lib
|
|
, stdenv
|
|
, lz4
|
|
, ffmpeg-full
|
|
, fetchFromGitHub
|
|
, openssh
|
|
, netcat
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "restream";
|
|
version = "1.3.1";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "rien";
|
|
repo = pname;
|
|
rev = "v${version}";
|
|
hash = "sha256-AXHKOfdIM3LsHF6u3M/lMhhcuPZADoEal7de3zlx7L4=";
|
|
};
|
|
|
|
dontConfigure = true;
|
|
dontBuild = true;
|
|
|
|
installPhase = ''
|
|
runHook preInstall
|
|
|
|
install -D ${src}/restream.arm.static $out/libexec/restream.arm.static
|
|
install -D ${src}/reStream.sh $out/bin/restream
|
|
|
|
runHook postInstall
|
|
'';
|
|
|
|
postInstall = let
|
|
deps = [
|
|
# `ffmpeg-full` is used here to bring in `ffplay`, which is used
|
|
# 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; {
|
|
description = "reMarkable screen sharing over SSH";
|
|
mainProgram = "restream";
|
|
homepage = "https://github.com/rien/reStream";
|
|
license = licenses.mit;
|
|
maintainers = [ maintainers.cpcloud ];
|
|
};
|
|
}
|