mirror of
https://github.com/NixOS/nix
synced 2025-07-10 04:43:53 +02:00
Convert fetchMercurial to a input type
This enables Mercurial flakes. It also fixes a bug in pure mode where you could use a branch/tag name rather than a revision.
This commit is contained in:
parent
9f4d8c6170
commit
b33b94748c
3 changed files with 313 additions and 173 deletions
|
@ -82,8 +82,8 @@ path2=$(nix eval --impure --raw --expr "(builtins.fetchMercurial $repo).outPath"
|
|||
|
||||
[[ $(nix eval --impure --raw --expr "(builtins.fetchMercurial $repo).rev") = 0000000000000000000000000000000000000000 ]]
|
||||
|
||||
# ... unless we're using an explicit rev.
|
||||
path3=$(nix eval --raw --expr "(builtins.fetchMercurial { url = $repo; rev = \"default\"; }).outPath")
|
||||
# ... unless we're using an explicit ref.
|
||||
path3=$(nix eval --impure --raw --expr "(builtins.fetchMercurial { url = $repo; rev = \"default\"; }).outPath")
|
||||
[[ $path = $path3 ]]
|
||||
|
||||
# Committing should not affect the store path.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue