Files
Luis-Hebendanz 2fb2a1d22a
All checks were successful
checks-impure / test (pull_request) Successful in 27s
checks / test (pull_request) Successful in 3m18s
Fixed ui openapi.json bug. Reverted buildDir settings
2024-01-23 12:17:29 +01:00

34 lines
839 B
Nix

{ fmod
, pkg
, pkgs
, clanPkgs
}:
pkgs.mkShell {
buildInputs = [
fmod.config.floco.settings.nodePackage
];
shellHook = ''
export ID=${pkg.built.tree}
currID=$(cat .floco/.node_modules_id 2> /dev/null)
mkdir -p .floco
if [[ "$ID" != "$currID" || ! -d "node_modules" ]];
then
${pkgs.rsync}/bin/rsync -a --checksum --chmod=ug+w --delete ${pkg.built.tree}/node_modules/ ./node_modules/
echo -n $ID > .floco/.node_modules_id
echo "floco ok: node_modules updated"
fi
ln -sf ${pkgs.roboto}/share/fonts ./src
export PATH="$PATH:$(realpath ./node_modules)/.bin"
export NEXT_BUILD_ID=$(git log -1 --pretty=format:"%H")
# re-generate the api code
rm -f --interactive=never openapi.json
rm -rf src/api
cp ${clanPkgs.clan-openapi}/openapi.json .
orval
'';
}