21efd7ac82
* move simple script to `examples/simple` * rm vscode settings.json * example npm * wip * refactoring * Update mkExecutable * rm custom formatter from vscode extensions * Add .gitignore * Update flake.nix * bundled/executable wip * Update flake * importMap * bundled wrapper * somerefactoring * no more overlay(default) * add todo * Update README.md
38 lines
862 B
Nix
38 lines
862 B
Nix
{
|
|
lib,
|
|
linkFarm,
|
|
writeText,
|
|
deno2nix,
|
|
...
|
|
}: let
|
|
inherit (builtins) split elemAt fetchurl toJSON hashString baseNameOf;
|
|
inherit (lib) flatten mapAttrsToList importJSON;
|
|
inherit (lib.strings) sanitizeDerivationName;
|
|
inherit (deno2nix.internal) artifactPath;
|
|
in
|
|
lockfile: (
|
|
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 = {};
|
|
});
|
|
}
|
|
]
|
|
)
|
|
(importJSON lockfile).remote
|
|
))
|
|
)
|