gr-base/shelf/default.nix

25 lines
577 B
Nix
Raw Normal View History

2025-08-02 10:24:01 +07:00
{ pkgs, system }:
let
denoShelf = import ./deno {
inherit pkgs system;
# collective hash of all (relevant) deno sources
# mapped to resulting shared deno cache hash
knownDenoHashes = {
"2JQI9Ie/fkl5Ltr22BGJynF9tFc=" =
"sha256-7csbrTbGd6J4a0Gkj9ndKhNxv90KeOHjr7DDNal3L4Q=";
};
};
shelfSetup = pkgs.writeShellScript "setup-shelf" ''
export DENO_DIR=$PWD/.deno_cache
rm -rf $DENO_DIR
cp -r ${denoShelf.cache} $DENO_DIR
chmod -R u+w "$DENO_DIR"
# TODO: add other interpreters
'';
in
{
setupScript = shelfSetup;
}