diff options
Diffstat (limited to 'pkgs/by-name/co/codefresh/package.nix')
-rw-r--r-- | pkgs/by-name/co/codefresh/package.nix | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/pkgs/by-name/co/codefresh/package.nix b/pkgs/by-name/co/codefresh/package.nix index 604ca4a83e952..36792f48dfaa3 100644 --- a/pkgs/by-name/co/codefresh/package.nix +++ b/pkgs/by-name/co/codefresh/package.nix @@ -1,36 +1,40 @@ -{ lib, mkYarnPackage, fetchFromGitHub, fetchYarnDeps, testers, codefresh }: +{ lib, stdenv, fetchFromGitHub, fetchYarnDeps, yarnConfigHook, npmHooks, nodejs, testers }: -mkYarnPackage rec { +stdenv.mkDerivation (finalAttrs: { pname = "codefresh"; version = "0.87.3"; src = fetchFromGitHub { owner = "codefresh-io"; repo = "cli"; - rev = "v${version}"; + rev = "v${finalAttrs.version}"; hash = "sha256-SUwt0oWls823EeLxT4CW+LDdsjAtSxxxKkllhMJXCtM="; }; offlineCache = fetchYarnDeps { - yarnLock = "${src}/yarn.lock"; + yarnLock = "${finalAttrs.src}/yarn.lock"; hash = "sha256-tzsHbvoQ59MwE4TYdPweLaAv9r4V8oyTQyvdeyPCsHY="; }; - packageJSON = ./package.json; - - doDist = false; + nativeBuildInputs = [ + yarnConfigHook + npmHooks.npmInstallHook + nodejs + ]; + # Tries to fetch stuff from the internet + dontNpmPrune = true; passthru.tests.version = testers.testVersion { - package = codefresh; + package = finalAttrs.finalPackage; # codefresh needs to read a config file, this is faked out with a subshell command = "codefresh --cfconfig <(echo 'contexts:') version"; }; meta = { - changelog = "https://github.com/codefresh-io/cli/releases/tag/v${version}"; + 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 ]; }; -} +}) |