improve shelf hiearchy

This commit is contained in:
EatThePooh 2025-08-02 10:24:01 +07:00
parent 928c1067b3
commit 9c18a0c924
5 changed files with 46 additions and 18 deletions

24
shelf/default.nix Normal file
View file

@ -0,0 +1,24 @@
{ 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;
}