YtDlp : Move to a separate package.
This commit is contained in:
parent
6db29f483c
commit
4693bced76
|
@ -133,6 +133,7 @@
|
|||
./module/common/Tmux.nix
|
||||
./module/common/Users.nix
|
||||
./module/common/Wallpaper.nix
|
||||
./module/common/YtDlp.nix
|
||||
];
|
||||
|
||||
# Function to create a host.
|
||||
|
|
|
@ -45,7 +45,7 @@
|
|||
wget
|
||||
wine64 dxvk vkd3d
|
||||
wl-clipboard
|
||||
yt-dlp
|
||||
# yt-dlp
|
||||
zip unzip
|
||||
];
|
||||
|
||||
|
|
5
module/common/YtDlp.nix
Normal file
5
module/common/YtDlp.nix
Normal file
|
@ -0,0 +1,5 @@
|
|||
{ pkgs, ... }: {
|
||||
environment.systemPackages = with pkgs; [
|
||||
(pkgs.callPackage ./ytdlp {})
|
||||
];
|
||||
}
|
28
module/common/ytdlp/default.nix
Normal file
28
module/common/ytdlp/default.nix
Normal file
|
@ -0,0 +1,28 @@
|
|||
{ lib, stdenv, fetchurl, autoPatchelfHook }: let
|
||||
version = "2024.03.10";
|
||||
hash = "sha256-sYhSMRngpDaPU+Ea0PIjx+1EqKKGY+S2wgUSLaA39Hs=";
|
||||
in stdenv.mkDerivation {
|
||||
name = "ytdlp";
|
||||
|
||||
dontUnpack = true;
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/yt-dlp/yt-dlp/releases/download/${version}/yt-dlp_linux";
|
||||
sha256 = "${hash}";
|
||||
};
|
||||
|
||||
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;
|
||||
meta.platforms = platforms.all;
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue