gopro-tool: init at 0-unstable-2024-04-18 (#382151)

Changed files
+98
maintainers
nixos
pkgs
by-name
go
gopro-tool
top-level
+6
maintainers/maintainer-list.nix
···
github = "zmitchell";
githubId = 10246891;
+
ZMon3y = {
+
name = "Matt Szafir";
+
email = "mattszafir+nix@gmail.com";
+
github = "ZMon3y";
+
githubId = 9386488;
+
};
znaniye = {
email = "zn4niye@proton.me";
github = "znaniye";
+1
nixos/tests/all-tests.nix
···
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
···
+
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
···
+
{
+
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;
+
};
+
}
+5
pkgs/top-level/all-packages.nix
···
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;
};