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;
}

View file

@ -1,32 +0,0 @@
{
name = "hjq";
description = "Drop-in jq replacement for HJSON that tries to preserve comments";
inputs = {
stdin = {
format = "HJSON";
react = "push";
};
jqFilter = {
format = "string";
react = "push";
};
};
outputs = {
stdout = {
format = "HJSON";
react = "push";
};
};
build = {
hashFiles = [ ./deno.json ./deno.lock ];
cacheCommand = "deno cache --frozen main.ts";
knownHashes = {
"sha1-gSeoE0sSj+dFQ7SUoyaQV0X/KJE=" =
"sha256-0ZfdWVfShbhgAoSse9vEpFPRh5XTTVjgxGMmezwon1I=";
};
};
}

View file

@ -2,7 +2,7 @@
"tasks": {
"start": "deno run --cached-only main.ts"
},
"patch": [
"links": [
"../hjq"
]
}

View file

@ -22,11 +22,6 @@
};
build = {
hashFiles = [ ./deno.json ./deno.lock ];
cacheCommand = "deno cache --frozen main.ts";
knownHashes = {
"sha1-uO43Rt1F6+Ud1wk2p9LQhfP180M=" =
"sha256-x/Fvn/l3J7C0D7AftlbRk7iuc6o9qPakdnHb72TSxec=";
} ;
lockFile = ./deno.lock;
};
}