2024-01-13 08:15:51 +00:00
|
|
|
{ lib
|
|
|
|
, fetchFromGitHub
|
|
|
|
, buildGoModule
|
|
|
|
, testers
|
|
|
|
, files-cli
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "files-cli";
|
2024-10-04 16:56:33 +00:00
|
|
|
version = "2.13.148";
|
2024-01-13 08:15:51 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
repo = "files-cli";
|
|
|
|
owner = "files-com";
|
|
|
|
rev = "v${version}";
|
2024-10-04 16:56:33 +00:00
|
|
|
hash = "sha256-r3pYDBE1YaKuFdxxpDVcMGfX5vOLt4xh3eY0fgLIGk0=";
|
2024-01-13 08:15:51 +00:00
|
|
|
};
|
|
|
|
|
2024-10-04 16:56:33 +00:00
|
|
|
vendorHash = "sha256-/w1uo3SmCUjKp1FcB2NfhrFCLh5zCP+6uf03uwb+SvU=";
|
2024-01-13 08:15:51 +00:00
|
|
|
|
|
|
|
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; {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Files.com Command Line App for Windows, Linux, and macOS";
|
2024-01-13 08:15:51 +00:00
|
|
|
homepage = "https://developers.files.com";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ kashw2 ];
|
|
|
|
mainProgram = "files-cli";
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|