feat(devtools): package Cloudflare and PikPak CLIs and patch Pi worker
This commit is contained in:
parent
92b7a1c67c
commit
8e0521e16b
10 changed files with 1247 additions and 7 deletions
55
packages/pikpak-cli.nix
Normal file
55
packages/pikpak-cli.nix
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
{
|
||||
fetchurl,
|
||||
lib,
|
||||
stdenvNoCC,
|
||||
}:
|
||||
let
|
||||
version = "0.5.2";
|
||||
sources = {
|
||||
aarch64-darwin = {
|
||||
asset = "pikpak_darwin_arm64";
|
||||
hash = "sha256-MG4c+2sSg0s2xKOHq17oEOVg29Z6Pojo8AuGHeo992U=";
|
||||
};
|
||||
x86_64-darwin = {
|
||||
asset = "pikpak_darwin_amd64";
|
||||
hash = "sha256-NKZe0qPxz+dQAnCaDOLWeBIJiahFsiqRztmCi25T6bA=";
|
||||
};
|
||||
aarch64-linux = {
|
||||
asset = "pikpak_linux_arm64";
|
||||
hash = "sha256-L1UChjwK7Edy8dYsS2aiAYA905FlKh79VxtiOE4As+s=";
|
||||
};
|
||||
x86_64-linux = {
|
||||
asset = "pikpak_linux_amd64";
|
||||
hash = "sha256-9pdJnLNWRbpMnnn/+fbq/QAydD8IxuzvMnaI5Ozs4UA=";
|
||||
};
|
||||
};
|
||||
source = sources.${stdenvNoCC.hostPlatform.system};
|
||||
in
|
||||
stdenvNoCC.mkDerivation {
|
||||
pname = "pikpak-cli";
|
||||
inherit version;
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://download.mypikpak.com/cli/release/v${version}/${source.asset}";
|
||||
inherit (source) hash;
|
||||
};
|
||||
|
||||
dontUnpack = true;
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
install -Dm755 "$src" "$out/bin/pikpak"
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "Command-line client for PikPak cloud storage";
|
||||
homepage = "https://mypikpak.com/en-US/cli";
|
||||
license = lib.licenses.unfree;
|
||||
mainProgram = "pikpak";
|
||||
platforms = builtins.attrNames sources;
|
||||
sourceProvenance = [ lib.sourceTypes.binaryNativeCode ];
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue