2024-07-19 23:26:57 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
stdenv,
|
|
|
|
fetchFromGitHub,
|
|
|
|
fetchYarnDeps,
|
|
|
|
yarnConfigHook,
|
|
|
|
yarnInstallHook,
|
|
|
|
nodejs,
|
|
|
|
testers,
|
|
|
|
}:
|
2024-02-21 13:10:51 +00:00
|
|
|
|
2024-06-07 15:54:40 +00:00
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
2024-02-21 13:10:51 +00:00
|
|
|
pname = "codefresh";
|
|
|
|
version = "0.87.3";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "codefresh-io";
|
|
|
|
repo = "cli";
|
2024-06-07 15:54:40 +00:00
|
|
|
rev = "v${finalAttrs.version}";
|
2024-02-21 13:10:51 +00:00
|
|
|
hash = "sha256-SUwt0oWls823EeLxT4CW+LDdsjAtSxxxKkllhMJXCtM=";
|
|
|
|
};
|
|
|
|
|
|
|
|
offlineCache = fetchYarnDeps {
|
2024-06-07 15:54:40 +00:00
|
|
|
yarnLock = "${finalAttrs.src}/yarn.lock";
|
2024-02-21 13:10:51 +00:00
|
|
|
hash = "sha256-tzsHbvoQ59MwE4TYdPweLaAv9r4V8oyTQyvdeyPCsHY=";
|
|
|
|
};
|
2024-06-07 15:54:40 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
yarnConfigHook
|
2024-07-19 23:26:57 +00:00
|
|
|
yarnInstallHook
|
2024-06-07 15:54:40 +00:00
|
|
|
nodejs
|
|
|
|
];
|
2024-02-21 13:10:51 +00:00
|
|
|
|
|
|
|
passthru.tests.version = testers.testVersion {
|
2024-06-07 15:54:40 +00:00
|
|
|
package = finalAttrs.finalPackage;
|
2024-02-21 13:10:51 +00:00
|
|
|
# codefresh needs to read a config file, this is faked out with a subshell
|
|
|
|
command = "codefresh --cfconfig <(echo 'contexts:') version";
|
|
|
|
};
|
|
|
|
|
|
|
|
meta = {
|
2024-06-07 15:54:40 +00:00
|
|
|
changelog = "https://github.com/codefresh-io/cli/releases/tag/v${finalAttrs.version}";
|
2024-02-21 13:10:51 +00:00
|
|
|
description = "Codefresh CLI tool to interact with Codefresh services";
|
|
|
|
homepage = "https://github.com/codefresh-io/cli";
|
|
|
|
license = lib.licenses.mit;
|
|
|
|
mainProgram = "codefresh";
|
|
|
|
maintainers = [ lib.maintainers.takac ];
|
|
|
|
};
|
2024-06-07 15:54:40 +00:00
|
|
|
})
|