From a357ca5b7fa70e7f5acecd244833678032902fa7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phan=20Kochen?= Date: Wed, 9 Nov 2022 13:22:02 +0100 Subject: [PATCH] Fix incorrect paths in generated expression --- src/generate.ts | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/generate.ts b/src/generate.ts index e569b1b..797503d 100644 --- a/src/generate.ts +++ b/src/generate.ts @@ -81,11 +81,6 @@ export default async ( // Determine relative paths for Nix path literals. const nixExprPath = configuration.get(`nixExprPath`); const lockfileFilename = configuration.get(`lockfileFilename`); - const lockfileRel = ppath.relative( - ppath.dirname(nixExprPath), - lockfileFilename - ); - const yarnPathRel = ppath.relative(ppath.dirname(nixExprPath), yarnPath); // Build a list of cache entries so Nix can fetch them. // TODO: See if we can use Nix fetchurl for npm: dependencies. @@ -281,8 +276,8 @@ export default async ( const projectName = ident ? structUtils.stringifyIdent(ident) : `workspace`; const projectExpr = renderTmpl(projectExprTmpl, { PROJECT_NAME: json(projectName), - YARN_PATH: yarnPathRel, - LOCKFILE: lockfileRel, + YARN_PATH: yarnPath, + LOCKFILE: lockfileFilename, CACHE_FOLDER: json(cacheFolder), CACHE_ENTRIES: cacheEntriesCode, ISOLATED: isolatedCode.join("\n"),