Skip to content

Commit

Permalink
[lib] Update denoAppCache2 using only the lock file
Browse files Browse the repository at this point in the history
  • Loading branch information
nktpro committed Sep 2, 2024
1 parent 8357983 commit b97ac84
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions lib/deno-app-cache2.nix
Original file line number Diff line number Diff line change
@@ -1,21 +1,23 @@
{ name
, config-file
, lock-file
, deno
, preCache ? ""
, postCache ? ""
, runCommand
, jq
}:
runCommand name
{
nativeBuildInputs = [ deno ];
nativeBuildInputs = [ deno jq ];
__noChroot = true;
} ''
mkdir $out
export DENO_DIR=$out
TEMP_OUT="$(mktemp -d)"
shopt -s globstar
${preCache}
deno install --config="${config-file}" --lock=${lock-file} --root="$TEMP_OUT"
cp "${lock-file}" ./deno.lock
jq -er '{ imports: .specifiers }' < deno.lock > deno.json
deno install --config=deno.json --lock=./deno.lock --check --root="$TEMP_OUT"
${postCache}
''

0 comments on commit b97ac84

Please sign in to comment.