mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-08-27 02:34:53 +00:00
55 lines
1.1 KiB
Nix
55 lines
1.1 KiB
Nix
{
|
|
lib,
|
|
fetchFromGitHub,
|
|
buildGoModule,
|
|
testers,
|
|
files-cli,
|
|
}:
|
|
|
|
buildGoModule (finalAttrs: {
|
|
pname = "files-cli";
|
|
version = "2.15.442";
|
|
|
|
src = fetchFromGitHub {
|
|
repo = "files-cli";
|
|
owner = "files-com";
|
|
rev = "v${finalAttrs.version}";
|
|
hash = "sha256-9PCCUe/5rTCcbu2IfW8FfAPTQNhDK5myx1IoV0DCtVo=";
|
|
};
|
|
|
|
vendorHash = "sha256-Wuf77aQynmcxdaSpUusjK9tqd9I9yiJuFi9L0KZpwmA=";
|
|
|
|
ldflags = [
|
|
"-s"
|
|
"-w"
|
|
"-X main.version=${finalAttrs.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 ${finalAttrs.version}";
|
|
};
|
|
};
|
|
|
|
meta = {
|
|
description = "Files.com Command Line App for Windows, Linux, and macOS";
|
|
homepage = "https://developers.files.com";
|
|
license = lib.licenses.mit;
|
|
maintainers = with lib.maintainers; [ kashw2 ];
|
|
mainProgram = "files-cli";
|
|
};
|
|
|
|
})
|