mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-07-06 17:13:24 -05:00
54 lines
1.1 KiB
Nix
54 lines
1.1 KiB
Nix
{
|
|
lib,
|
|
fetchFromGitHub,
|
|
buildGoModule,
|
|
testers,
|
|
files-cli,
|
|
}:
|
|
|
|
buildGoModule (finalAttrs: {
|
|
pname = "files-cli";
|
|
version = "2.15.316";
|
|
|
|
src = fetchFromGitHub {
|
|
repo = "files-cli";
|
|
owner = "files-com";
|
|
rev = "v${finalAttrs.version}";
|
|
hash = "sha256-3+M14M0xf2dkIAdgNGe2gTmJ9Vr7h/vCe4H/quiSsU0=";
|
|
};
|
|
|
|
vendorHash = "sha256-rly02HSliL+WXs/XTn9Eb5W+jeGuNVRS8R2vjPGnhGM=";
|
|
|
|
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";
|
|
};
|
|
|
|
})
|