depot/third_party/nixpkgs/pkgs/by-name/fi/files-cli/package.nix
Default email 5c370c0b2a Project import generated by Copybara.
GitOrigin-RevId: 33d1e753c82ffc557b4a585c77de43d4c922ebb5
2024-05-15 17:35:15 +02:00

53 lines
1 KiB
Nix

{ lib
, fetchFromGitHub
, buildGoModule
, testers
, files-cli
}:
buildGoModule rec {
pname = "files-cli";
version = "2.13.41";
src = fetchFromGitHub {
repo = "files-cli";
owner = "files-com";
rev = "v${version}";
hash = "sha256-WW6E0K3HOi8gtBwcmN9syV4wM73BPGyXbv3t4ZJjoIc=";
};
vendorHash = "sha256-LdebAbdbiUX0xw1EJKCzK1jdt5+FgoZQBPI0apZkcsc=";
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";
};
}