From 645da1ae0208763fb8893ad954cf4461cbc98aa7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phan=20Kochen?= Date: Tue, 4 Jan 2022 15:20:16 +0100 Subject: [PATCH] Account for mismatch in 'fetch-one' filename --- src/tmpl/yarn-project.nix.in | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/tmpl/yarn-project.nix.in b/src/tmpl/yarn-project.nix.in index 8fb795b..9841c85 100644 --- a/src/tmpl/yarn-project.nix.in +++ b/src/tmpl/yarn-project.nix.in @@ -37,7 +37,8 @@ let cd "$src" HOME="$TMP" yarn_cache_folder="$TMP" CI=1 \ node '${yarnPath}' nixify fetch-one $locator - mv "$TMP/$outputFilename" $out + # Because we change the cache dir, Yarn may generate a different name. + mv "$TMP/$(sed 's/-[^-]*\.[^-]*$//' <<< "$outputFilename")"-* $out ''; in lib.mapAttrs (locator: { filename, sha512 }: stdenv.mkDerivation { inherit src builder locator;