Skip to content

Commit

Permalink
WIP: regenerate yarn lock
Browse files Browse the repository at this point in the history
  • Loading branch information
mweinelt committed May 5, 2024
1 parent 937a79f commit 8f26e12
Show file tree
Hide file tree
Showing 2 changed files with 4,880 additions and 1 deletion.
8 changes: 7 additions & 1 deletion pkgs/servers/web-apps/discourse/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ let

yarnOfflineCache = fetchYarnDeps {
yarnLock = src + "/app/assets/javascripts/yarn.lock";
sha256 = "0vgrvj0jvgbg4s5ry3qh4pn4pa5km5yj4kmxj3wpg5qnbzcirkyj";
sha256 = "sha256-ZBXvNdHHV92kSAswe6KA+OqaY5smf7ZKTTOiY8g78D0=";
};

nativeBuildInputs = runtimeDeps ++ [
Expand Down Expand Up @@ -241,6 +241,10 @@ let
./assets_patch-package_from_path.patch
];

postPatch = ''
cp ${./yarn.lock} yarn.lock
'';

# We have to set up an environment that is close enough to
# production ready or the assets:precompile task refuses to
# run. This means that Redis and PostgreSQL has to be running and
Expand Down Expand Up @@ -363,6 +367,8 @@ let
sed -Ei "s,(\.\./)+(lib|app)/,$out/share/discourse/\2/," {} \;
find config -maxdepth 1 -type f -name "*.rb" -execdir \
sed -Ei "s,require_relative (\"|')([[:alnum:]].*)(\"|'),require_relative '$out/share/discourse/config/\2'," {} \;
cp ${./yarn.lock} yarn.lock
'';

buildPhase = ''
Expand Down
Loading

0 comments on commit 8f26e12

Please sign in to comment.