mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-23 23:43:30 +00:00
54 lines
1.0 KiB
Nix
54 lines
1.0 KiB
Nix
{ lib
|
|
, fetchFromGitHub
|
|
, buildGoModule
|
|
, testers
|
|
, files-cli
|
|
}:
|
|
|
|
buildGoModule rec {
|
|
pname = "files-cli";
|
|
version = "2.13.72";
|
|
|
|
src = fetchFromGitHub {
|
|
repo = "files-cli";
|
|
owner = "files-com";
|
|
rev = "v${version}";
|
|
hash = "sha256-u5hAUGGaMpUub4WL8CGEzbnfXPRouaGbb8SQ6ep3X3Q=";
|
|
};
|
|
|
|
vendorHash = "sha256-y4XZeugjqy6ydAq6KQ8iIgMgE6iHAEqzzi2A+N1LB3M=";
|
|
|
|
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";
|
|
};
|
|
|
|
}
|