-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
23c787a
commit 337c892
Showing
13 changed files
with
236 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,18 +11,23 @@ workflows: | |
only: | ||
- master | ||
- auto/upgrade-dependencies | ||
|
||
matrix: | ||
parameters: | ||
host: [voron, oracle] | ||
orbs: | ||
nix: eld/[email protected] | ||
|
||
jobs: | ||
build: | ||
machine: | ||
image: ubuntu-2204:2023.07.1 | ||
parameters: | ||
host: | ||
type: string | ||
resource_class: arm.large | ||
steps: | ||
- nix/install: | ||
channels: nixpkgs=https://nixos.org/channels/nixpkgs-unstable | ||
channels: nixpkgs=https://nixos.org/channels/nixos-23.05 | ||
extra-conf: | | ||
experimental-features = flakes nix-command | ||
- nix/install-cachix | ||
|
@@ -38,7 +43,7 @@ jobs: | |
- run: | ||
name: Build system | ||
command: | | ||
nix build ".#nixosConfigurations.nixos-voron.config.system.build.toplevel" | ||
nix build ".#nixosConfigurations.nixos-<< parameters.hots >>.config.system.build.toplevel" | ||
- run: | ||
name: Push cache | ||
command: | | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
{ | ||
lib, | ||
stdenv, | ||
sources, | ||
# tools | ||
pkg-config, | ||
ccache, | ||
unixtools, | ||
cmake, | ||
# dependencies | ||
nlohmann_json, | ||
ffmpeg, | ||
libcamera, | ||
live555, | ||
gnutls, | ||
# Build flags | ||
useHWH264 ? true, | ||
useFfmpeg ? false, | ||
useLibcamera ? false, | ||
useRtsp ? false, | ||
useLibdatachannel ? true, | ||
... | ||
}: let | ||
inherit (lib) optionals optional; | ||
in | ||
stdenv.mkDerivation rec { | ||
pname = "camera-streamer"; | ||
|
||
inherit (sources.camera-streamer) version src; | ||
|
||
# NIX_DEBUG = 1; | ||
# NIX_CFLAGS_COMPILE = "-Wno-error"; | ||
|
||
hardeningDisable = ["all"]; | ||
|
||
makeFlags = | ||
[ | ||
"GIT_VERSION=${version}" | ||
"GIT_REVISION=${version}" | ||
] | ||
++ optional useHWH264 "USE_HW_H264=1" | ||
++ optional useFfmpeg "USE_FFMPEG=1" | ||
++ optional useLibcamera "USE_LIBCAMERA=1" | ||
++ optional useRtsp "USE_RTSP=1"; | ||
|
||
nativeBuiltInputs = [pkg-config ccache unixtools.xxd cmake]; | ||
|
||
buildInputs = | ||
[nlohmann_json] | ||
++ optional useFfmpeg ffmpeg | ||
++ optional useLibcamera libcamera | ||
++ optional useRtsp live555 | ||
++ optional useLibdatachannel gnutls; | ||
|
||
configurePhase = '' | ||
echo '#define GIT_VERSION "${version}"' > version.h | ||
echo '#define GIT_REVISION "${version}"' >> version.h | ||
sed -i 's/all: version/all:/g' Makefile | ||
export PATH="${pkg-config}/bin:${unixtools.xxd}/bin:${cmake}/bin::$PATH" | ||
''; | ||
|
||
installPhase = '' | ||
$preInstallPhase | ||
mkdir -p $out/bin | ||
cp camera-streamer $out/bin/ | ||
$postInstallPhase | ||
''; | ||
|
||
meta = with lib; { | ||
description = "Touchscreen GUI that interfaces with Klipper via Moonraker"; | ||
homepage = "https://klipperscreen.readthedocs.io/en/latest/"; | ||
platforms = platforms.linux; | ||
license = licenses.gpl3Only; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.