depot/third_party/nixpkgs/pkgs/by-name/fi/files-cli/package.nix
Default email 472aeafc57 Project import generated by Copybara.
GitOrigin-RevId: c31898adf5a8ed202ce5bea9f347b1c6871f32d1
2024-10-04 18:56:33 +02:00

53 lines
1 KiB
Nix

{ lib
, fetchFromGitHub
, buildGoModule
, testers
, files-cli
}:
buildGoModule rec {
pname = "files-cli";
version = "2.13.148";
src = fetchFromGitHub {
repo = "files-cli";
owner = "files-com";
rev = "v${version}";
hash = "sha256-r3pYDBE1YaKuFdxxpDVcMGfX5vOLt4xh3eY0fgLIGk0=";
};
vendorHash = "sha256-/w1uo3SmCUjKp1FcB2NfhrFCLh5zCP+6uf03uwb+SvU=";
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";
};
}