depot/third_party/nixpkgs/pkgs/by-name/fi/files-cli/package.nix
Default email 587713944a Project import generated by Copybara.
GitOrigin-RevId: 6143fc5eeb9c4f00163267708e26191d1e918932
2024-04-21 17:54:59 +02:00

53 lines
1 KiB
Nix

{ lib
, fetchFromGitHub
, buildGoModule
, testers
, files-cli
}:
buildGoModule rec {
pname = "files-cli";
version = "2.13.2";
src = fetchFromGitHub {
repo = "files-cli";
owner = "files-com";
rev = "v${version}";
hash = "sha256-xlsM3WVnhZlEwnPNpUaB8IIwsoqt1C0XVsbqm9G1vuU=";
};
vendorHash = "sha256-7KL73P7oKrK2Sfgk/74D3cmQGXoDau+3gBThn+37pb8=";
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";
};
}