2024-01-13 08:15:51 +00:00
|
|
|
{ lib
|
|
|
|
, fetchFromGitHub
|
|
|
|
, buildGoModule
|
|
|
|
, testers
|
|
|
|
, files-cli
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "files-cli";
|
2024-09-19 14:19:46 +00:00
|
|
|
version = "2.13.136";
|
2024-01-13 08:15:51 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
repo = "files-cli";
|
|
|
|
owner = "files-com";
|
|
|
|
rev = "v${version}";
|
2024-09-19 14:19:46 +00:00
|
|
|
hash = "sha256-F20cGZtPTaiZakRiw0xspS7Mxxwr9VDTcRjHeRaLAq0=";
|
2024-01-13 08:15:51 +00:00
|
|
|
};
|
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
vendorHash = "sha256-ftO+jt3MurZ4erNUmFlMEuVskVIbpRbpIWb7gZVr3jk=";
|
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";
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|