Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{
2 lib,
3 buildGoModule,
4 fetchFromGitHub,
5 makeWrapper,
6 ffmpeg,
7}:
8
9buildGoModule rec {
10 pname = "lux";
11 version = "0.24.1";
12
13 src = fetchFromGitHub {
14 owner = "iawia002";
15 repo = "lux";
16 rev = "v${version}";
17 hash = "sha256-3d8EQ7GzufZvMfjHbVMdpuGE+vPdSir4diSnB29v0sw=";
18 };
19
20 nativeBuildInputs = [ makeWrapper ];
21
22 vendorHash = "sha256-RCZzcycUKqJgwBZZQBD1UEZCZCitpiqNpD51oKm6IvI=";
23
24 ldflags = [
25 "-s"
26 "-w"
27 "-X github.com/iawia002/lux/app.version=v${version}"
28 ];
29
30 postInstall = ''
31 wrapProgram $out/bin/lux \
32 --prefix PATH : ${lib.makeBinPath [ ffmpeg ]}
33 '';
34
35 doCheck = false; # require network
36
37 meta = {
38 description = "Fast and simple video download library and CLI tool written in Go";
39 homepage = "https://github.com/iawia002/lux";
40 changelog = "https://github.com/iawia002/lux/releases/tag/v${version}";
41 license = lib.licenses.mit;
42 maintainers = with lib.maintainers; [ galaxy ];
43 mainProgram = "lux";
44 };
45}