Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 stdenv, 4 fetchFromGitHub, 5 fetchYarnDeps, 6 yarnConfigHook, 7 yarnInstallHook, 8 nodejs, 9 testers, 10}: 11 12stdenv.mkDerivation (finalAttrs: { 13 pname = "codefresh"; 14 version = "0.89.2"; 15 16 src = fetchFromGitHub { 17 owner = "codefresh-io"; 18 repo = "cli"; 19 rev = "v${finalAttrs.version}"; 20 hash = "sha256-Cf3I+w0rVsjsu+m+vE/pOcASYTmsRi0yAQVpJkYbzUU="; 21 }; 22 23 offlineCache = fetchYarnDeps { 24 yarnLock = "${finalAttrs.src}/yarn.lock"; 25 hash = "sha256-wD3BmWjrFGkNqUhbo2TrWLwgo2o2MiQn7X3fyDYt5dw="; 26 }; 27 nativeBuildInputs = [ 28 yarnConfigHook 29 yarnInstallHook 30 nodejs 31 ]; 32 33 passthru.tests.version = testers.testVersion { 34 package = finalAttrs.finalPackage; 35 # codefresh needs to read a config file, this is faked out with a subshell 36 command = "codefresh --cfconfig <(echo 'contexts:') version"; 37 }; 38 39 meta = { 40 changelog = "https://github.com/codefresh-io/cli/releases/tag/v${finalAttrs.version}"; 41 description = "Codefresh CLI tool to interact with Codefresh services"; 42 homepage = "https://github.com/codefresh-io/cli"; 43 license = lib.licenses.mit; 44 mainProgram = "codefresh"; 45 maintainers = [ lib.maintainers.takac ]; 46 }; 47})