Building mix project fails after updating dependencies

I am trying to update the dependencies of the mobilizon package which uses mixRelease (and mix2nix to convert mix.lock file to a nix).

However, after updating the dependencies it builds them fine and then fails when trying to build the final mobilizon application.

The output looks like this:

Compiling 457 files (.ex)
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).

18:30:59.424 [warning] Could not read git commit hash, using Mix version code instead.
Compiling lib/web/gettext.ex (it's taking more than 10s)
Compiling lib/web/cache/cache.ex (it's taking more than 10s)
note: The locales ["nb_NO", "pt_BR"] are configured in the Mobilizon.Web.Gettext gettext backend but are unknown to CLDR. They will n>
Generating Mobilizon.Cldr for 32 locales named [:ar, :be, :bn, :ca, :cs, ...] with a default locale named :en
Compiling lib/mobilizon/cldr.ex (it's taking more than 10s)
Compiling lib/graphql/schema.ex (it's taking more than 10s)
Generated mobilizon app
Unchecked dependencies for environment prod:
* exkismet (https://github.com/tcitworld/exkismet.git)
  the dependency is not available, run "mix deps.get"
* shortuuid (Hex package)
  lock mismatch: the dependency is out of date. To fetch locked version run "mix deps.get"
* geolix (Hex package)
  lock mismatch: the dependency is out of date. To fetch locked version run "mix deps.get"
* eblurhash (Hex package)
  the dependency is not available, run "mix deps.get"
* rajska (https://github.com/tcitworld/rajska.git - origin/mobilizon)
  the dependency is not available, run "mix deps.get"
* icalendar (https://github.com/tcitworld/icalendar.git)
  the dependency is not available, run "mix deps.get"
......
* erlport (Hex package)
  the dependency is not available, run "mix deps.get"
* export (Hex package)
  lock mismatch: the dependency is out of date. To fetch locked version run "mix deps.get"
* fast_sanitize (Hex package)
  lock mismatch: the dependency is out of date. To fetch locked version run "mix deps.get"
* phoenix_ecto (Hex package)
  lock mismatch: the dependency is out of date. To fetch locked version run "mix deps.get"
** (Mix) Can't continue due to errors on dependencies
/nix/store/3qnm3nwjajgqa771dmi2dnwxrw0kzq5m-stdenv-linux/setup: line 131: pop_var_context: head of shell_variables not a function context

So it lists (i think all) dependencies as being the wrong version or missing.
I have found one similar problem online Docker build started failing - unchecked dependencies for environment prod - Questions / Help - Elixir Programming Language Forum
This states it might be a problem with a mismatch in the version of hex that generates and uses a lock file?
Note that building the project without nix works just fine and as far as i can tell i updated all mentions of the dependency versions.
Another thing is that if i revert the dependencies to their original versions it works fine again.

Let me know if you have any idea what could be the problem, thank you!

Oh, btw here is the change https://github.com/CoenHolten/Mobilizon-for-Climate-Justice-for-ALL-living-beings/commit/c63d345cdac8be31ca3708df3da4ca594d5678ae

I just ran into the same issue and found a solution (or is it a workaround?).
It seems to only happen when git dependencies are present in mix.exs.

Change this:

postBuild = ''
  mix phx.digest --no-deps-check
'';

To this:

postBuild = ''
  mix do deps.loadpaths --no-deps-check, phx.digest
'';