nixpkgs/pkgs/by-name/co/codefresh/package.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

48 lines
1.2 KiB
Nix
Raw Normal View History

2024-07-19 23:26:57 +00:00
{
lib,
stdenv,
fetchFromGitHub,
fetchYarnDeps,
yarnConfigHook,
yarnInstallHook,
nodejs,
testers,
}:
2024-06-07 15:54:40 +00:00
stdenv.mkDerivation (finalAttrs: {
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}";
hash = "sha256-SUwt0oWls823EeLxT4CW+LDdsjAtSxxxKkllhMJXCtM=";
};
offlineCache = fetchYarnDeps {
2024-06-07 15:54:40 +00:00
yarnLock = "${finalAttrs.src}/yarn.lock";
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
];
passthru.tests.version = testers.testVersion {
2024-06-07 15:54:40 +00:00
package = finalAttrs.finalPackage;
# 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}";
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
})