Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
50 lines
1.1 KiB
Nix
50 lines
1.1 KiB
Nix
{
|
|
fetchFromGitHub,
|
|
buildGoModule,
|
|
lib,
|
|
versionCheckHook,
|
|
}:
|
|
|
|
buildGoModule rec {
|
|
pname = "baidupcs-go";
|
|
version = "3.9.9";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "qjfoidnh";
|
|
repo = "BaiduPCS-Go";
|
|
rev = "v${version}";
|
|
hash = "sha256-x0oEuj8LoR0yUkKOzI27u3AIFVDDV7vMHCqvjENHwv8=";
|
|
};
|
|
|
|
vendorHash = "sha256-hW+IrzS5+DublQUIIcecL08xoauTjba9qnAtpzNeDXw=";
|
|
|
|
doCheck = false;
|
|
|
|
ldflags = [
|
|
"-X main.Version=${version}"
|
|
];
|
|
|
|
nativeInstallCheckInputs = [
|
|
versionCheckHook
|
|
];
|
|
doInstallCheck = true;
|
|
versionCheckProgram = "${placeholder "out"}/bin/${meta.mainProgram}";
|
|
|
|
postInstall = ''
|
|
rm -f $out/bin/AndroidNDKBuild
|
|
ln -s $out/bin/BaiduPCS-Go $out/bin/baidupcs-go || true
|
|
'';
|
|
|
|
postVersionCheck = ''
|
|
rm -f $out/bin/pcs_config.json
|
|
'';
|
|
|
|
meta = {
|
|
mainProgram = "BaiduPCS-Go";
|
|
maintainers = with lib.maintainers; [ xddxdd ];
|
|
description = "Baidu Netdisk commandline client, mimicking Linux shell file handling commands";
|
|
homepage = "https://github.com/qjfoidnh/BaiduPCS-Go";
|
|
license = lib.licenses.asl20;
|
|
};
|
|
}
|