2025-08-14 16:42:33 +00:00

55 lines
1.0 KiB
Nix

{
lib,
fetchFromGitHub,
buildGoModule,
testers,
files-cli,
}:
buildGoModule rec {
pname = "files-cli";
version = "2.15.77";
src = fetchFromGitHub {
repo = "files-cli";
owner = "files-com";
rev = "v${version}";
hash = "sha256-anDChFR4vax0fFdT1+WVdzuzNUhsfgwGljQmQj6jD4E=";
};
vendorHash = "sha256-p4ZMukOuU93Cwt19gOxXTqgdTMML4yppSI7WHIwCPag=";
ldflags = [
"-s"
"-w"
"-X main.version=${version}"
];
doInstallCheck = true;
installCheckPhase = ''
runHook preInstallCheck
$out/bin/files-cli --help
runHook postInstallCheck
'';
passthru.tests = {
version = testers.testVersion {
package = files-cli;
command = "files-cli -v";
version = "files-cli version ${version}";
};
};
meta = with lib; {
description = "Files.com Command Line App for Windows, Linux, and macOS";
homepage = "https://developers.files.com";
license = licenses.mit;
maintainers = with maintainers; [ kashw2 ];
mainProgram = "files-cli";
};
}