mirror of
https://github.com/SebastianWendel/nixpkgs.git
synced 2024-09-20 04:19:00 +02:00
lemmy: fix ui commit_hash path
This commit is contained in:
parent
c3ed95307e
commit
676fe5e01b
|
@ -160,7 +160,7 @@ in
|
|||
root * ${cfg.ui.package}/dist
|
||||
file_server
|
||||
}
|
||||
handle_path /static/undefined/* {
|
||||
handle_path /static/${cfg.ui.package.passthru.commit_sha}/* {
|
||||
root * ${cfg.ui.package}/dist
|
||||
file_server
|
||||
}
|
||||
|
|
|
@ -55,6 +55,13 @@ mkYarnPackage {
|
|||
hash = pinData.uiYarnDepsHash;
|
||||
};
|
||||
|
||||
patchPhase = ''
|
||||
substituteInPlace ./package.json \
|
||||
--replace '$(git rev-parse --short HEAD)' "${src.rev}" \
|
||||
--replace 'yarn clean' 'yarn --offline clean' \
|
||||
--replace 'yarn run rimraf dist' 'yarn --offline run rimraf dist'
|
||||
'';
|
||||
|
||||
yarnPreBuild = ''
|
||||
export npm_config_nodedir=${nodejs}
|
||||
'';
|
||||
|
@ -79,6 +86,7 @@ mkYarnPackage {
|
|||
|
||||
passthru.updateScript = ./update.py;
|
||||
passthru.tests.lemmy-ui = nixosTests.lemmy;
|
||||
passthru.commit_sha = src.rev;
|
||||
|
||||
meta = with lib; {
|
||||
description = "Building a federated alternative to reddit in rust";
|
||||
|
|
Loading…
Reference in a new issue