fix for external local module
This commit is contained in:
parent
5e9abb8075
commit
754df647ab
|
@ -90,22 +90,17 @@ in rec {
|
||||||
denoFlags ? [],
|
denoFlags ? [],
|
||||||
}:
|
}:
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation {
|
||||||
inherit name entrypoint;
|
inherit src name entrypoint;
|
||||||
denoFlags =
|
denoFlags =
|
||||||
denoFlags
|
denoFlags
|
||||||
++ ["--lock" lockfile]
|
++ ["--lock" "${src}/${lockfile}"]
|
||||||
++ ["--cached-only"]
|
++ ["--cached-only"]
|
||||||
++ ["--output" name]
|
++ ["--output" name]
|
||||||
++ (
|
++ (
|
||||||
if importMap != null
|
if importMap != null
|
||||||
then ["--import-map" importMap]
|
then ["--import-map" "${src}/${importMap}"]
|
||||||
else []
|
else []
|
||||||
);
|
);
|
||||||
|
|
||||||
src = cleanSourceWith {
|
|
||||||
inherit src;
|
|
||||||
filter = path: type: (baseNameOf path != name);
|
|
||||||
};
|
|
||||||
buildInputs = with pkgs; [
|
buildInputs = with pkgs; [
|
||||||
deno
|
deno
|
||||||
jq
|
jq
|
||||||
|
@ -114,7 +109,8 @@ in rec {
|
||||||
|
|
||||||
buildPhase = ''
|
buildPhase = ''
|
||||||
export DENO_DIR=`mktemp -d`
|
export DENO_DIR=`mktemp -d`
|
||||||
ln -s "${mkDepsLink lockfile}" $(deno info --json | jq -r .modulesCache)
|
ln -s "${mkDepsLink "${src}/${lockfile}"}" $(deno info --json | jq -r .modulesCache)
|
||||||
|
ls $(dirname $src/$entrypoint)
|
||||||
|
|
||||||
deno compile $denoFlags "$entrypoint"
|
deno compile $denoFlags "$entrypoint"
|
||||||
'';
|
'';
|
||||||
|
|
Loading…
Reference in a new issue