mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-28 00:24:18 +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.12.46";
|
|
|
|
src = fetchFromGitHub {
|
|
repo = "files-cli";
|
|
owner = "files-com";
|
|
rev = "v${version}";
|
|
hash = "sha256-GloZt9vAh+b65iOy4qqrH1Os1Ygh45sP9lZepxTs0qc=";
|
|
};
|
|
|
|
vendorHash = "sha256-pT8+s/xzsDXul8S+8JF18MRJv6FgoNDcwnL12Wkxryo=";
|
|
|
|
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";
|
|
};
|
|
|
|
}
|