depot/third_party/nixpkgs/pkgs/by-name/fi/files-cli/package.nix
Default email fa5436e0a7 Project import generated by Copybara.
GitOrigin-RevId: e8057b67ebf307f01bdcc8fba94d94f75039d1f6
2024-06-05 17:53:02 +02:00

53 lines
1 KiB
Nix

{ lib
, fetchFromGitHub
, buildGoModule
, testers
, files-cli
}:
buildGoModule rec {
pname = "files-cli";
version = "2.13.65";
src = fetchFromGitHub {
repo = "files-cli";
owner = "files-com";
rev = "v${version}";
hash = "sha256-SUxITjWgUQcF7G6w5PZUpjvBH3tGhK/A1sOVg6SEfTU=";
};
vendorHash = "sha256-QVQi60j0XR1OApLG/WPq9aAP4P/2hYCbTLL/3sHAisw=";
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";
};
}