Handle non-github git recipes
Used by ob-clojure-literate. Noticed through upcoming test coverage improvement.
This commit is contained in:
parent
aa0eb06567
commit
a0bdac47f7
1 changed files with 7 additions and 1 deletions
|
|
@ -229,10 +229,16 @@ let
|
||||||
url =
|
url =
|
||||||
if (p.recipe.host or "") == "github" && p ? recipe.repo
|
if (p.recipe.host or "") == "github" && p ? recipe.repo
|
||||||
then "https://github.com/${p.recipe.repo}"
|
then "https://github.com/${p.recipe.repo}"
|
||||||
|
else if (p.recipe.type or "") == "git"
|
||||||
|
&& p ? recipe.repo
|
||||||
|
&& (p.recipe.host or null) == null
|
||||||
|
then p.recipe.repo
|
||||||
else epkg.src.gitRepoUrl
|
else epkg.src.gitRepoUrl
|
||||||
or extraUrls.${name}
|
or extraUrls.${name}
|
||||||
or (if isElpa then "https://github.com/emacs-straight/${name}"
|
or (if isElpa then "https://github.com/emacs-straight/${name}"
|
||||||
else (throw "${name}: cannot derive url from recipe ${p.recipe or "<missing>"}"));
|
else (let
|
||||||
|
recipe = lib.generators.toPretty {} (p.recipe or "missing");
|
||||||
|
in throw "${name}: cannot derive url from recipe ${recipe}"));
|
||||||
# Use builtins.fetchGit instead of nixpkgs's fetchFromGitHub because
|
# Use builtins.fetchGit instead of nixpkgs's fetchFromGitHub because
|
||||||
# fetchGit allows fetching a specific git commit without a hash.
|
# fetchGit allows fetching a specific git commit without a hash.
|
||||||
fetchGitArgs = {
|
fetchGitArgs = {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue