25 lines
577 B
Nix
25 lines
577 B
Nix
|
|
{ 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;
|
||
|
|
}
|