Skip to content

Commit a2b7f18

Browse files
authored
gopro-tool: move overrides to package.nix, modernize (#485675)
2 parents dde7437 + 662fd4b commit a2b7f18

2 files changed

Lines changed: 18 additions & 12 deletions

File tree

pkgs/by-name/go/gopro-tool/package.nix

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,30 @@
55
makeWrapper,
66
ffmpeg,
77
vlc,
8+
vlc' ? vlc.overrideAttrs (old: {
9+
buildInputs = old.buildInputs ++ [ x264 ];
10+
}),
811
jq,
12+
x264,
13+
nixosTests,
914
}:
1015

11-
stdenv.mkDerivation {
16+
stdenv.mkDerivation (finalAttrs: {
1217
pname = "gopro-tool";
13-
version = "0-unstable-2024-04-18";
18+
version = "1.18";
1419

1520
src = fetchFromGitHub {
1621
owner = "juchem";
1722
repo = "gopro-tool";
18-
rev = "a678f0ea65e24dca9b8d848b245bd2d487d3c8ca";
19-
sha256 = "0sh3s38m17pci24x4kdlmlhn0gwgm28aaa6p7qs16wysk0q0h6wz";
23+
tag = "v${finalAttrs.version}";
24+
hash = "sha256-nxsIMJjacxM0PtcopZCojz9gIa20TdKJiOyeUNHQA2o=";
2025
};
2126

2227
nativeBuildInputs = [ makeWrapper ];
2328

29+
strictDeps = true;
30+
__structuredAttrs = true;
31+
2432
installPhase = ''
2533
mkdir -p $out/bin
2634
cp $src/gopro-tool $out/bin/gopro-tool
@@ -30,16 +38,20 @@ stdenv.mkDerivation {
3038
--prefix PATH : ${
3139
lib.makeBinPath [
3240
ffmpeg
33-
vlc
41+
vlc'
3442
jq
3543
]
3644
}
3745
'';
3846

47+
passthru.tests = {
48+
inherit (nixosTests) gopro-tool;
49+
};
50+
3951
meta = {
4052
description = "Tool to control GoPro webcam mode in Linux (requires v4l2loopback kernel module and a firewall rule)";
4153
license = lib.licenses.bsd3;
4254
maintainers = with lib.maintainers; [ ZMon3y ];
4355
platforms = lib.platforms.linux;
4456
};
45-
}
57+
})

pkgs/top-level/all-packages.nix

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4371,12 +4371,6 @@ with pkgs;
43714371

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

4374-
gopro-tool = callPackage ../by-name/go/gopro-tool/package.nix {
4375-
vlc = vlc.overrideAttrs (old: {
4376-
buildInputs = old.buildInputs ++ [ x264 ];
4377-
});
4378-
};
4379-
43804374
gwe = callPackage ../tools/misc/gwe {
43814375
nvidia_x11 = linuxPackages.nvidia_x11;
43824376
};

0 commit comments

Comments
 (0)