proper deno dep management

This commit is contained in:
EatThePooh 2025-08-05 21:21:46 +07:00
parent f937a3454d
commit 6abdf04412
11 changed files with 74 additions and 184 deletions

View file

@ -5,24 +5,23 @@ let
scrollDirs = lib.discoverScrolls {
scrollsDir = denoScrollsDir;
};
mkScroll = subDir: lib.readDenoScroll {
inherit pkgs system subDir;
scrollsDir = denoScrollsDir;
};
mkScroll = subDir: import "${denoScrollsDir}/${subDir}/scroll.nix";
scrolls = builtins.map mkScroll scrollDirs;
sharedCache = lib.buildSharedDenoCache {
inherit pkgs system;
scrollsDir = denoScrollsDir;
subDirs = scrollDirs;
lockfiles = builtins.map (s: s.build.lockFile) scrolls;
denoSharedCache = lib.denoSharedCache {
inherit pkgs lockfiles;
};
in
{
setupScript = lib.makeDenoShelfSetup {
inherit pkgs sharedCache;
setupScript = lib.installDenoCache {
inherit pkgs;
cache = denoSharedCache;
};
scrolls = builtins.map (s: s.meta) scrolls;
scrolls =
builtins.map (s: builtins.removeAttrs s [ "build" ]) scrolls;
}