2022-09-09 14:36:35 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
linkFarm,
|
|
|
|
writeText,
|
2022-12-14 04:00:56 +00:00
|
|
|
deno2nix,
|
2022-09-09 14:36:35 +00:00
|
|
|
...
|
|
|
|
}: let
|
|
|
|
inherit (builtins) split elemAt fetchurl toJSON hashString baseNameOf;
|
|
|
|
inherit (lib) flatten mapAttrsToList importJSON;
|
|
|
|
inherit (lib.strings) sanitizeDerivationName;
|
2022-12-14 04:00:56 +00:00
|
|
|
inherit (deno2nix.internal) artifactPath;
|
|
|
|
in
|
|
|
|
lockfile: (
|
2022-09-09 14:36:35 +00:00
|
|
|
linkFarm "deps" (flatten (
|
|
|
|
mapAttrsToList
|
|
|
|
(
|
|
|
|
url: sha256: let
|
|
|
|
in [
|
|
|
|
{
|
|
|
|
name = artifactPath url;
|
|
|
|
path = fetchurl {
|
|
|
|
inherit url sha256;
|
|
|
|
name = sanitizeDerivationName (baseNameOf url);
|
|
|
|
};
|
|
|
|
}
|
|
|
|
{
|
|
|
|
name = artifactPath url + ".metadata.json";
|
|
|
|
path = writeText "metadata.json" (toJSON {
|
|
|
|
inherit url;
|
|
|
|
headers = {};
|
|
|
|
});
|
|
|
|
}
|
|
|
|
]
|
|
|
|
)
|
2022-12-09 04:50:40 +00:00
|
|
|
(importJSON lockfile).remote
|
2022-09-09 14:36:35 +00:00
|
|
|
))
|
2022-12-14 04:00:56 +00:00
|
|
|
)
|