gopro-tool: init at 0-unstable-2024-04-18
This commit is contained in:
parent
bdd0cbbefe
commit
e40c33427e
@ -404,6 +404,7 @@ in {
|
||||
gollum = handleTest ./gollum.nix {};
|
||||
gonic = handleTest ./gonic.nix {};
|
||||
google-oslogin = handleTest ./google-oslogin {};
|
||||
gopro-tool = handleTest ./gopro-tool.nix {};
|
||||
goss = handleTest ./goss.nix {};
|
||||
gotenberg = handleTest ./gotenberg.nix {};
|
||||
gotify-server = handleTest ./gotify-server.nix {};
|
||||
|
41
nixos/tests/gopro-tool.nix
Normal file
41
nixos/tests/gopro-tool.nix
Normal file
@ -0,0 +1,41 @@
|
||||
import ./make-test-python.nix (
|
||||
{ lib, pkgs, ... }:
|
||||
|
||||
let
|
||||
testScript = ''
|
||||
start_all()
|
||||
|
||||
machine.wait_for_unit("multi-user.target")
|
||||
|
||||
# Check that gopro-tool is installed
|
||||
machine.succeed("which gopro-tool")
|
||||
|
||||
# Check that the v4l2loopback module is available
|
||||
machine.succeed("lsmod | grep v4l2loopback || echo 'Module not found'")
|
||||
|
||||
# Check that VLC is installed
|
||||
machine.succeed("which vlc")
|
||||
'';
|
||||
in
|
||||
{
|
||||
name = "gopro-tool";
|
||||
meta.maintainers = with lib.maintainers; [ ZMon3y ];
|
||||
nodes.machine =
|
||||
{ config, pkgs, ... }:
|
||||
{
|
||||
# Ensure dependencies are installed
|
||||
environment.systemPackages = with pkgs; [
|
||||
gopro-tool
|
||||
vlc
|
||||
];
|
||||
|
||||
# Load kernel module for testing
|
||||
boot.extraModulePackages = with config.boot.kernelPackages; [ v4l2loopback ];
|
||||
|
||||
# Enable module loading
|
||||
boot.kernelModules = [ "v4l2loopback" ];
|
||||
};
|
||||
|
||||
testScript = testScript;
|
||||
}
|
||||
)
|
45
pkgs/by-name/go/gopro-tool/package.nix
Normal file
45
pkgs/by-name/go/gopro-tool/package.nix
Normal file
@ -0,0 +1,45 @@
|
||||
{
|
||||
lib,
|
||||
stdenv,
|
||||
fetchFromGitHub,
|
||||
makeWrapper,
|
||||
ffmpeg,
|
||||
vlc,
|
||||
jq,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
pname = "gopro-tool";
|
||||
version = "0-unstable-2024-04-18";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "juchem";
|
||||
repo = "gopro-tool";
|
||||
rev = "a678f0ea65e24dca9b8d848b245bd2d487d3c8ca";
|
||||
sha256 = "0sh3s38m17pci24x4kdlmlhn0gwgm28aaa6p7qs16wysk0q0h6wz";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
cp $src/gopro-tool $out/bin/gopro-tool
|
||||
chmod +x $out/bin/gopro-tool
|
||||
|
||||
wrapProgram $out/bin/gopro-tool \
|
||||
--prefix PATH : ${
|
||||
lib.makeBinPath [
|
||||
ffmpeg
|
||||
vlc
|
||||
jq
|
||||
]
|
||||
}
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "A tool to control GoPro webcam mode in Linux (requires v4l2loopback kernel module and a firewall rule)";
|
||||
license = lib.licenses.bsd3;
|
||||
maintainers = with lib.maintainers; [ ZMon3y ];
|
||||
platforms = lib.platforms.linux;
|
||||
};
|
||||
}
|
@ -6222,6 +6222,11 @@ with pkgs;
|
||||
|
||||
dotnetPackages = recurseIntoAttrs (callPackage ./dotnet-packages.nix {});
|
||||
|
||||
gopro-tool = callPackage ../by-name/go/gopro-tool/package.nix {
|
||||
vlc =
|
||||
vlc.overrideAttrs (old: { buildInputs = old.buildInputs ++ [ x264 ]; });
|
||||
};
|
||||
|
||||
gwe = callPackage ../tools/misc/gwe {
|
||||
nvidia_x11 = linuxPackages.nvidia_x11;
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user