mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-08-25 17:55:21 +00:00
files-cli: modernize
Signed-off-by: Ethan Carter Edwards <ethan@ethancedwards.com>
This commit is contained in:
@@ -2,18 +2,19 @@
|
||||
lib,
|
||||
fetchFromGitHub,
|
||||
buildGoModule,
|
||||
testers,
|
||||
files-cli,
|
||||
versionCheckHook,
|
||||
}:
|
||||
|
||||
buildGoModule (finalAttrs: {
|
||||
pname = "files-cli";
|
||||
version = "2.15.448";
|
||||
|
||||
__structuredAttrs = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
repo = "files-cli";
|
||||
owner = "files-com";
|
||||
rev = "v${finalAttrs.version}";
|
||||
tag = "v${finalAttrs.version}";
|
||||
hash = "sha256-blOBJWst/SYrf/POXM1hNrCr86SM+LBdEVewE0ej1CA=";
|
||||
};
|
||||
|
||||
@@ -21,28 +22,12 @@ buildGoModule (finalAttrs: {
|
||||
|
||||
ldflags = [
|
||||
"-s"
|
||||
"-w"
|
||||
"-X main.version=${finalAttrs.version}"
|
||||
];
|
||||
|
||||
nativeInstallCheckInputs = [ versionCheckHook ];
|
||||
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";
|
||||
|
||||
Reference in New Issue
Block a user