Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 fetchFromGitHub, 4 buildGoModule, 5 testers, 6 files-cli, 7}: 8 9buildGoModule rec { 10 pname = "files-cli"; 11 version = "2.15.61"; 12 13 src = fetchFromGitHub { 14 repo = "files-cli"; 15 owner = "files-com"; 16 rev = "v${version}"; 17 hash = "sha256-QYfZ9xRz9KtoXMkUlmLjYGTMNzBM7MZr/v8yjT/urLw="; 18 }; 19 20 vendorHash = "sha256-Uw+69gRSSnFSFSgaw97vzzdQuX5W4qnKSDHPZM3ipmA="; 21 22 ldflags = [ 23 "-s" 24 "-w" 25 "-X main.version=${version}" 26 ]; 27 28 doInstallCheck = true; 29 30 installCheckPhase = '' 31 runHook preInstallCheck 32 33 $out/bin/files-cli --help 34 35 runHook postInstallCheck 36 ''; 37 38 passthru.tests = { 39 version = testers.testVersion { 40 package = files-cli; 41 command = "files-cli -v"; 42 version = "files-cli version ${version}"; 43 }; 44 }; 45 46 meta = with lib; { 47 description = "Files.com Command Line App for Windows, Linux, and macOS"; 48 homepage = "https://developers.files.com"; 49 license = licenses.mit; 50 maintainers = with maintainers; [ kashw2 ]; 51 mainProgram = "files-cli"; 52 }; 53 54}