41 lines
1.1 KiB
Nix
41 lines
1.1 KiB
Nix
|
{
|
||
|
akkoma-frontends,
|
||
|
fetchFromGitea,
|
||
|
fetchYarnDeps
|
||
|
}:
|
||
|
akkoma-frontends.akkoma-fe.overrideAttrs (let
|
||
|
src = fetchFromGitea {
|
||
|
domain = "git.sakamoto.pl";
|
||
|
owner = "domi";
|
||
|
repo = "akkoma-fe";
|
||
|
rev = "5f0339ce005ccb12365128089edb5fd77f60841b";
|
||
|
hash = "sha256-AHmJyOFmQZXmNMMsp8ONm9Itns1H/idEKl8+sxn2RSA=";
|
||
|
};
|
||
|
offlineCache = fetchYarnDeps {
|
||
|
yarnLock = "${src}/yarn.lock";
|
||
|
hash = "sha256-7WB6nmxNckMdftKds2OgD2kClvCCT/I5vmthV0jrkSs=";
|
||
|
};
|
||
|
in {
|
||
|
version = "unstable-2024-07-20";
|
||
|
pname = "akkoma-fe-domi";
|
||
|
inherit src offlineCache;
|
||
|
postPatch = ''
|
||
|
# Build scripts assume to be used within a Git repository checkout
|
||
|
sed -E -i '/^let commitHash =/,/;$/clet commitHash = "${builtins.substring 0 7 src.rev}";' \
|
||
|
build/webpack.prod.conf.js
|
||
|
'';
|
||
|
|
||
|
configurePhase = ''
|
||
|
runHook preConfigure
|
||
|
|
||
|
export HOME="$(mktemp -d)"
|
||
|
|
||
|
yarn config --offline set yarn-offline-mirror ${offlineCache}
|
||
|
fixup-yarn-lock yarn.lock
|
||
|
|
||
|
yarn install --offline --frozen-lockfile --ignore-platform --ignore-scripts --no-progress --non-interactive
|
||
|
|
||
|
runHook postConfigure
|
||
|
'';
|
||
|
})
|