nix/package/ytdlp/default.nix

32 lines
715 B
Nix
Raw Normal View History

{
autoPatchelfHook,
fetchurl,
lib,
stdenv,
}:
let
hash = "sha256-rwVwteYBlqF4WhLn9I/Hy3tXRbC7mHDKL+btkN3YC0Y=";
version = "2024.05.27";
in
stdenv.mkDerivation {
dontUnpack = true;
name = "ytdlp";
src = fetchurl {
sha256 = "${hash}";
url = "https://github.com/yt-dlp/yt-dlp/releases/download/${version}/yt-dlp_linux";
};
nativeBuildInputs = [ autoPatchelfHook ];
installPhase = ''
mkdir -p $out/bin
cp $src $out/bin/yt-dlp
chmod +x $out/bin/yt-dlp
'';
meta = with lib; {
description = "Youtube Downloader.";
homepage = "https://github.com/yt-dlp/yt-dlp";
license = licenses.unlicense;
mainProgram = "yt-dlp";
meta.platforms = platforms.all;
};
2024-03-14 13:24:49 +03:00
}