fetchgit: support "git@server:repo" URLs
Update the code that extracts the base name from a git repo URL so that it can deal with URLs like "git@server:repo".
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
{stdenv, git, cacert}: let
|
||||
urlToName = url: rev: let
|
||||
base = baseNameOf (stdenv.lib.removeSuffix "/" url);
|
||||
inherit (stdenv.lib) removeSuffix splitString last;
|
||||
base = last (splitString ":" (baseNameOf (removeSuffix "/" url)));
|
||||
|
||||
matched = builtins.match "(.*).git" base;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user