1
0
Fork 0
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:
Eelco Dolstra 2020-01-21 23:49:32 +01:00
parent 9f4d8c6170
commit b33b94748c
3 changed files with 313 additions and 173 deletions

View file

@ -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.