-
-
Notifications
You must be signed in to change notification settings - Fork 14.9k
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
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this 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" ]; |
There was a problem hiding this comment.
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 ]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use nativeBuildInputs
please
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 |
There was a problem hiding this comment.
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 }: |
There was a problem hiding this comment.
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 ]; |
There was a problem hiding this comment.
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"; |
There was a problem hiding this comment.
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.
Things done
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)Add a 👍 reaction to pull requests you find important.