2023-11-16 04:20:00 +00:00
|
|
|
{ lib
|
|
|
|
, buildGoModule
|
|
|
|
, fetchFromGitHub
|
|
|
|
, makeWrapper
|
|
|
|
, ffmpeg
|
|
|
|
}:
|
2022-09-30 11:47:45 +00:00
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "lux";
|
2023-11-16 04:20:00 +00:00
|
|
|
version = "0.21.0";
|
|
|
|
|
2022-09-30 11:47:45 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "iawia002";
|
|
|
|
repo = "lux";
|
|
|
|
rev = "v${version}";
|
2023-11-16 04:20:00 +00:00
|
|
|
hash = "sha256-LCYWfF7O8wByCJNDi2BZsI7EU6wJqhcr/sbNOoQ2Src=";
|
2022-09-30 11:47:45 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
vendorHash = "sha256-wW/jrsurmyLcDX+58lp0M+snJ2avEs0HciNZ8BgIqrI=";
|
2022-09-30 11:47:45 +00:00
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
ldflags = [
|
|
|
|
"-s"
|
|
|
|
"-w"
|
|
|
|
"-X github.com/iawia002/lux/app.version=v${version}"
|
|
|
|
];
|
2022-09-30 11:47:45 +00:00
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
wrapProgram $out/bin/lux \
|
|
|
|
--prefix PATH : ${lib.makeBinPath [ ffmpeg ]}
|
|
|
|
'';
|
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
doCheck = false; # require network
|
2022-09-30 11:47:45 +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-11-16 04:20:00 +00:00
|
|
|
maintainers = with maintainers; [ galaxy ];
|
2022-09-30 11:47:45 +00:00
|
|
|
};
|
|
|
|
}
|