2023-10-30 09:21:54 +00:00
|
|
|
{ lib
|
|
|
|
, buildGoModule
|
|
|
|
, fetchFromGitHub
|
|
|
|
, makeWrapper
|
|
|
|
, ffmpeg
|
|
|
|
}:
|
2022-09-24 01:42:43 +00:00
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "lux";
|
2023-11-25 00:44:18 +00:00
|
|
|
version = "0.22.0";
|
2023-10-30 09:21:54 +00:00
|
|
|
|
2022-09-24 01:42:43 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "iawia002";
|
|
|
|
repo = "lux";
|
|
|
|
rev = "v${version}";
|
2023-11-25 00:44:18 +00:00
|
|
|
hash = "sha256-v74+Ykz9aro1x+9psg2LnuodKE2/pCw9knZop0etQOg=";
|
2022-09-24 01:42:43 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
|
2023-11-25 00:44:18 +00:00
|
|
|
vendorHash = "sha256-1VZFKDoSuSUmYw7g6SwB/dXnFaw7+cGHKfgT96HaI/o=";
|
2022-09-24 01:42:43 +00:00
|
|
|
|
2023-10-30 09:21:54 +00:00
|
|
|
ldflags = [
|
|
|
|
"-s"
|
|
|
|
"-w"
|
|
|
|
"-X github.com/iawia002/lux/app.version=v${version}"
|
|
|
|
];
|
2022-09-24 01:42:43 +00:00
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
wrapProgram $out/bin/lux \
|
|
|
|
--prefix PATH : ${lib.makeBinPath [ ffmpeg ]}
|
|
|
|
'';
|
|
|
|
|
2023-10-30 09:21:54 +00:00
|
|
|
doCheck = false; # require network
|
2022-09-24 01:42:43 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Fast and simple video download library and CLI tool written in Go";
|
|
|
|
homepage = "https://github.com/iawia002/lux";
|
|
|
|
changelog = "https://github.com/iawia002/lux/releases/tag/v${version}";
|
|
|
|
license = licenses.mit;
|
2023-10-30 09:21:54 +00:00
|
|
|
maintainers = with maintainers; [ galaxy ];
|
2023-11-23 02:51:17 +00:00
|
|
|
mainProgram = "lux";
|
2022-09-24 01:42:43 +00:00
|
|
|
};
|
|
|
|
}
|