Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

ZMon3y
Copy link

@ZMon3y ZMon3y commented Feb 14, 2025

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 25.05 Release Notes (or backporting 24.11 and 25.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

@github-actions github-actions bot added 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: maintainer-list (update) This PR changes `maintainers/maintainer-list.nix` labels Feb 14, 2025
@NixOSInfra NixOSInfra added the 12. first-time contribution This PR is the author's first one; please be gentle! label Feb 14, 2025
Copy link
Member

@RossComputerGuy RossComputerGuy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the contribution. Please make sure you nixfmt the files you added.

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" ];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cannot be a string

sha256 = "0sh3s38m17pci24x4kdlmlhn0gwgm28aaa6p7qs16wysk0q0h6wz";
};

buildInputs = [ makeWrapper ];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use nativeBuildInputs please

Comment on lines +24 to +57
cat <<'EOF' > $out/README
GoPro Tool requires the following manual setup:

1. **Enable the \`v4l2loopback\` kernel module** (needed for webcam support).
If you're on NixOS, add this to \`/etc/nixos/configuration.nix\`:

```nix
boot.extraModulePackages = with config.boot.kernelPackages; [ v4l2loopback ];
boot.kernelModules = [ "v4l2loopback" ];
```

Then rebuild with:
```sh
sudo nixos-rebuild switch
```

2. **Ensure your user is in the \`video\` group** to access \`/dev/video*\`:
```sh
sudo usermod -aG video \$USER
```

Then log out and log back in for the changes to take effect.

3. **Allow UDP traffic on port 8554 in your firewall**:
```nix
networking.firewall.allowedUDPPorts = [ 8554 ];
```

4. **Start the GoPro webcam stream**:
```sh
gopro-tool start device
```

EOF
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unnecessary to ship the README like this.

@@ -0,0 +1,66 @@
{ lib, stdenv, fetchFromGitHub, makeWrapper, ffmpeg, vlc, jq }:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please put this in by-name (pkgs/by-name/go/gopro-tool)

@@ -6222,6 +6222,12 @@ with pkgs;

dotnetPackages = recurseIntoAttrs (callPackage ./dotnet-packages.nix {});

gopro-tool = callPackage ../tools/video/gopro-tool {
vlc = vlc.overrideAttrs (old: {
buildInputs = old.buildInputs ++ [ x264 ];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this necessary?


stdenv.mkDerivation {
pname = "gopro-tool";
version = "unstable-2024-04-18";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add 0- as a prefix to the version.

@RossComputerGuy RossComputerGuy changed the title Gopro tool gopro-tool: init at 0-unstable-2024-04-18 Feb 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: maintainer-list (update) This PR changes `maintainers/maintainer-list.nix` 12. first-time contribution This PR is the author's first one; please be gentle!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants