Skip to content

Conversation

@burdzwastaken
Copy link

@burdzwastaken burdzwastaken commented Nov 1, 2025

What

fixes: #894

Why

yarn.lock was missing the form-data@^2.5.5 semver range that is required by the package.json resolutions, causing yarn install --frozen-lockfile to fail in Nix environments due to offline build constraints

Notes

I was able to test it with this PR locally and it is looking much better!

Nix behaviour previously when attempting to jump from 0.89.2 > 0.89.5:

 update-codefresh [!⇡] ~/src/nixpkgs ❯ nix run .#codefresh version
warning: Git tree '/home/burdz/src/nixpkgs' is dirty
error: builder for '/nix/store/yibf3j2jwv3l4a8cxpqzavhkwc2kg0hb-codefresh-0.89.5.drv' failed with exit code 1;
       last 17 log lines:
       > Running phase: unpackPhase
       > unpacking source archive /nix/store/dyw0qql23kqfpq0hdbfj7kx4gpdi2fgf-source
       > source root is source
       > Running phase: patchPhase
       > Running phase: updateAutotoolsGnuConfigScriptsPhase
       > Running phase: configurePhase
       > no configure script, doing nothing
       > Executing yarnConfigHook
       > Validating consistency between /build/source/yarn.lock and /nix/store/m0mnawzhkqf3f6qibgcrz4dqh54mmn0x-offline/yarn.lock
       > yarn config v1.22.22
       > success Set "yarn-offline-mirror" to "/nix/store/m0mnawzhkqf3f6qibgcrz4dqh54mmn0x-offline".
       > Done in 0.03s.
       > yarn install v1.22.22
       > [1/4] Resolving packages...
       > error Couldn't find any versions for "form-data" that matches "^2.5.5" in our cache (possible versions are ""). This is usually caused by a missing entry in the lockfile, running Yarn without the --offline flag may help fix this issue.
       > info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
       >
       For full logs, run:
         nix log /nix/store/yibf3j2jwv3l4a8cxpqzavhkwc2kg0hb-codefresh-0.89.5.drv

Nix behaviour with this change:

 update-codefresh [!⇡] ~/src/nixpkgs/pkgs/by-name/co/codefresh ❯ gd
diff --git a/pkgs/by-name/co/codefresh/package.nix b/pkgs/by-name/co/codefresh/package.nix
index f825c2b9f0d8..fe6e60078b7b 100644
--- a/pkgs/by-name/co/codefresh/package.nix
+++ b/pkgs/by-name/co/codefresh/package.nix
@@ -11,18 +11,21 @@

 stdenv.mkDerivation (finalAttrs: {
   pname = "codefresh";
-  version = "0.89.2";
+  version = "0.89.5";

   src = fetchFromGitHub {
     owner = "codefresh-io";
     repo = "cli";
-    rev = "v${finalAttrs.version}";
-    hash = "sha256-Cf3I+w0rVsjsu+m+vE/pOcASYTmsRi0yAQVpJkYbzUU=";
+    rev = "c196f41f8a6493e6dd6eae4edb40c916ea0977fd"; # commit https://github.com/codefresh-io/cli/pull/895
+    hash = "sha256-F8+oUwxfG3xGU0UIpaBf8Jx5UkK/3RJLlFiHn0Dapxo=";
   };

   offlineCache = fetchYarnDeps {
     yarnLock = "${finalAttrs.src}/yarn.lock";
-    hash = "sha256-wD3BmWjrFGkNqUhbo2TrWLwgo2o2MiQn7X3fyDYt5dw=";
+    hash = "sha256-0n6dNp65JCTb7SsXtZeuyf5jK5R2Z2k2OfkPo58bHFc=";
   };
   nativeBuildInputs = [
     yarnConfigHook
 update-codefresh [!⇡] ~/src/nixpkgs/pkgs/by-name/co/codefresh ❯ nix run .#codefresh version
path '/home/burdz/src/nixpkgs/pkgs/by-name/co/codefresh' does not contain a 'flake.nix', searching up
warning: Git tree '/home/burdz/src/nixpkgs' is dirty
client version: 0.89.5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

yarn.lock missing form-data@^2.5.5 entry in v0.89.5

1 participant