From 0c49f1896efdf7d058d7e5aabeec5ce6a84c89d7 Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Fri, 9 Oct 2020 09:55:35 +0200 Subject: [PATCH] yarn2nix-moretea: re-add support for `git://` URLs from `yarn.lock` @lheckemann already added it to `yarn2nix` a while ago[1], but it seems as it was forgotten to include when adding `yarn2nix` sources to `nixpkgs` itself. Without this patch, you cannot add dependencies to your `package.json` with URLs like `git://github.com/.../` as building the expression would fail like this: ``` curl: (1) Protocol "git" not supported or disabled in libcurl error: cannot download git___github.com_sstur_nodeftpd.git from any mirror ``` Co-authored-by: Linus Heckemann [1] https://github.com/nix-community/yarn2nix/pull/141 --- .../tools/yarn2nix-moretea/yarn2nix/lib/generateNix.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/tools/yarn2nix-moretea/yarn2nix/lib/generateNix.js b/pkgs/development/tools/yarn2nix-moretea/yarn2nix/lib/generateNix.js index 964eaf2555d..cebe7c715d1 100644 --- a/pkgs/development/tools/yarn2nix-moretea/yarn2nix/lib/generateNix.js +++ b/pkgs/development/tools/yarn2nix-moretea/yarn2nix/lib/generateNix.js @@ -80,7 +80,7 @@ function fetchLockedDep(builtinFetchGit) { const fileName = urlToName(url) - if (url.startsWith('git+')) { + if (url.startsWith('git+') || url.startsWith("git:")) { const rev = sha1OrRev const [_, branch] = nameWithVersion.split('#')