pulsebert: migrate from httpbounder to rust-mjpeg-proxy
This commit is contained in:
parent
fb0e2724a9
commit
211106cf53
|
@ -152,11 +152,11 @@ in
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
locations."/cam/stream" = {
|
locations."/cam/stream" = {
|
||||||
proxyPass = "http://localhost:8081/video.mjpg";
|
proxyPass = "http://localhost:3030/stream.mjpeg";
|
||||||
extraConfig = "proxy_pass_request_headers off;";
|
extraConfig = "proxy_pass_request_headers off;";
|
||||||
};
|
};
|
||||||
locations."/cam/capture" = {
|
locations."/cam/capture" = {
|
||||||
proxyPass = "${espCam}/capture";
|
proxyPass = "http://localhost:3030/capture.jpg";
|
||||||
extraConfig = "proxy_pass_request_headers off;";
|
extraConfig = "proxy_pass_request_headers off;";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -194,7 +194,7 @@ in
|
||||||
|
|
||||||
systemd.services.mjpeg-stream =
|
systemd.services.mjpeg-stream =
|
||||||
let
|
let
|
||||||
httpbounder = pkgs.callPackage <lib/pkgs/httpbounder.nix> {};
|
mjpeg-proxy = pkgs.callPackage <lib/pkgs/mjpeg-proxy.nix> {};
|
||||||
in {
|
in {
|
||||||
wantedBy = [ "multi-user.target" ];
|
wantedBy = [ "multi-user.target" ];
|
||||||
after = [ "network.target" ];
|
after = [ "network.target" ];
|
||||||
|
@ -204,7 +204,7 @@ in
|
||||||
Restart = "always";
|
Restart = "always";
|
||||||
RestartSec = 60;
|
RestartSec = 60;
|
||||||
};
|
};
|
||||||
script = "exec ${httpbounder}/bin/httpbounder -b 127.0.0.1:8081 -i ${espCam}/stream";
|
script = "exec ${mjpeg-proxy}/bin/rust-mjpeg-proxy ${espCam}/stream";
|
||||||
};
|
};
|
||||||
|
|
||||||
# Allow gpio group to access GPIO devices
|
# Allow gpio group to access GPIO devices
|
||||||
|
|
|
@ -1,18 +1,16 @@
|
||||||
{ fetchFromGitHub, rustPlatform, pkg-config, openssl }:
|
{ fetchgit, rustPlatform, pkg-config, openssl }:
|
||||||
|
|
||||||
rustPlatform.buildRustPackage rec {
|
rustPlatform.buildRustPackage rec {
|
||||||
pname = "httpbounder";
|
pname = "rust-mjpeg-proxy";
|
||||||
version = "unstable-2020-10-23";
|
version = "unstable-2021-02-21";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchgit {
|
||||||
owner = "Szperak";
|
url = "https://gitea.c3d2.de/astro/rust-mjpeg-proxy.git";
|
||||||
repo = "httpbounder";
|
rev = "d64611c0c3f91ff594054110197db097b649782d";
|
||||||
rev = "540d8e8beea5b75c2761ab3500464f1ebdebbc4f";
|
sha256 = "004hgaq046lq0d1mn46p5g17qll18k5ssm4igwfi0k98lc2l3s8x";
|
||||||
sha256 = "0m0q3835055xr2pq6726f9pp9ws1q6mwhfmgkylsagzzkrcpmnar";
|
|
||||||
};
|
};
|
||||||
cargoPatches = [ ./httpbounder.patch ];
|
|
||||||
|
|
||||||
cargoSha256 = "137zl2d2pr5p4zr6a8rrbc52izz25yh6cgilvag4fvnhgwv986c0";
|
cargoSha256 = "1lsrzgszag9g93s3wqm3h1jbsh5dsik4gp7ci3lgmlb4h94ziqn2";
|
||||||
nativeBuildInputs = [ pkg-config ];
|
nativeBuildInputs = [ pkg-config ];
|
||||||
buildInputs = [ openssl ];
|
buildInputs = [ openssl ];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue