From 85ac13b7ef8ed068c0685eb8ca3f166b050fd102 Mon Sep 17 00:00:00 2001 From: Lan Tian Date: Sun, 19 May 2024 12:30:16 -0700 Subject: [PATCH] baidupcs-go: init at 3.9.5 --- pkgs/by-name/ba/baidupcs-go/package.nix | 33 +++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 pkgs/by-name/ba/baidupcs-go/package.nix diff --git a/pkgs/by-name/ba/baidupcs-go/package.nix b/pkgs/by-name/ba/baidupcs-go/package.nix new file mode 100644 index 000000000000..bc02fbf83729 --- /dev/null +++ b/pkgs/by-name/ba/baidupcs-go/package.nix @@ -0,0 +1,33 @@ +{ + buildGo122Module, + lib, + fetchFromGitHub, + versionCheckHook, +}: +buildGo122Module rec { + pname = "baidupcs-go"; + version = "3.9.5"; + src = fetchFromGitHub { + owner = "qjfoidnh"; + repo = "BaiduPCS-Go"; + rev = "v${version}"; + hash = "sha256-zNodRQzflOOB3hAeq4KbjRFlHQwknVy+4ucipUcoufY="; + }; + + vendorHash = "sha256-msTlXtidxLTe3xjxTOWCqx/epFT0XPdwGPantDJUGpc="; + doCheck = false; + + nativeInstallCheckInputs = [ + versionCheckHook + ]; + doInstallCheck = true; + versionCheckProgram = "${placeholder "out"}/bin/${meta.mainProgram}"; + + meta = { + 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; + mainProgram = "BaiduPCS-Go"; + }; +}