mirror of
https://github.com/nix-community/noogle.git
synced 2024-11-29 23:02:22 +03:00
23 lines
592 B
Nix
23 lines
592 B
Nix
{ fmod, pkg, pkgs, hooks, ... }:
|
|
pkgs.mkShell {
|
|
packages = [ fmod.config.floco.settings.nodePackage ];
|
|
shellHook = ''
|
|
${hooks.prepare}
|
|
|
|
|
|
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
|
|
|
|
export PATH="$PATH:$(realpath ./node_modules)/.bin"
|
|
|
|
'';
|
|
}
|