deno2nix
deno2nix copied to clipboard
Hash mismatch for esm.sh dependencies?
Revision: 53adb67
Flake snippet:
packages.uploader = pkgs.deno2nix.mkExecutable {
pname = "uploader";
version = self.rev;
src = ./.;
bin = "uploader";
lockfile = "./deno.lock";
config = "./deno.json";
entrypoint = "./uploader.ts";
allow = {
all = true;
};
};
Imports in the code:
// @deno-types="./dcmjs.d.ts"
import dcmjs from "https://esm.sh/[email protected]";
Output:
error:
… while calling the 'derivationStrict' builtin
at //builtin/derivation.nix:9:12: (source not available)
… while evaluating derivation 'uploader-a396ad10ace1db0742491a00c09e2ebf0492990e'
whose name attribute is located at /nix/store/2ja7y9nhrck3ydp9bj2234hcid0sx7qg-source/pkgs/stdenv/generic/make-derivation.nix:303:7
… while evaluating attribute 'buildPhase' of derivation 'uploader-a396ad10ace1db0742491a00c09e2ebf0492990e'
at /nix/store/n5qyjg02vv11842wg394andkips3b6dp-source/nix/mk-executable.nix:62:5:
61| buildInputs = with pkgs; [deno jq];
62| buildPhase = ''
| ^
63| export DENO_DIR="/tmp/deno2nix"
(stack trace truncated; use '--show-trace' to show the full trace)
error: hash mismatch in file downloaded from 'https://esm.sh/[email protected]':
specified: sha256:0w14lnwghk2mlmxqr3ph48wxd9igy9ri0ychqxj0bmzjd207bz8q
got: sha256:1ccgp70zn7id4x5j37n1hwlx5hvjr1w22i33wmgr2camcsb709lf
Here are the relevant entries in deno.lock:
"https://esm.sh/[email protected]": "18fd758068f2d70564c790791073f22fa6d63922f08e8c7ba5554cf8b8a52470",
"https://esm.sh/v120/[email protected]/deno/dcmjs.mjs": "63d7d710335da06c486b60085b0116324b7831a1a3ab542db3acced26faba222"
Got the same issue. Any insights / clues ?
Fairly sure this is caused by #6. There is more discussion in #27.