Closed basvandijk closed 4 years ago
Nix master doesn't seem to support specifying git tags as refs anymore. For example the following works in the current 2.3.8 release of Nix:
$ nix repl Welcome to Nix version 2.3.8. Type :? for help. nix-repl> builtins.fetchGit { url = "..."; ref = "some-tag"; rev = "..."; } { outPath = "/nix/store/...-source"; rev = "..."; revCount = ...; shortRev = "..."; }
However it fails using Nix master (https://github.com/NixOS/nix/commit/4e7f1c7f11fb22d7954b2dacbe87c61548fab82d):
$ git clone git://github.com/NixOS/nix $ cd nix $ nix-shell $ ./bootstrap.sh $ configurePhase $ make $ make install $ inst/bin/nix repl Welcome to Nix version 3.0. Type :? for help. nix-repl> builtins.fetchGit { url = "..."; ref = "some-tag"; rev = "..."; } fetching Git repository '...'fatal: couldn't find remote ref refs/heads/some-tag error: --- Error ------------------------------------------------------------------------------------------------------------------------------------------------- nix program 'git' failed with exit code 128
I do see that it works with: ref="refs/tags/some-tag":
ref="refs/tags/some-tag"
nix-repl> builtins.fetchGit { url = ..."; ref = "refs/tags/some-tag"; rev = "..."; } { lastModified = ...; lastModifiedDate = "..."; narHash = "sha256-..."; outPath = "/nix/store/...-source"; rev = "..."; revCount = ...; shortRev = "..."; submodules = false; }
So maybe niv can switch to always using /refs/heads/<branch> for branches and /refs/tags/<tag> for tags.
niv
/refs/heads/<branch>
/refs/tags/<tag>
Nix master doesn't seem to support specifying git tags as refs anymore. For example the following works in the current 2.3.8 release of Nix:
However it fails using Nix master (https://github.com/NixOS/nix/commit/4e7f1c7f11fb22d7954b2dacbe87c61548fab82d):
I do see that it works with:
ref="refs/tags/some-tag"
:So maybe
niv
can switch to always using/refs/heads/<branch>
for branches and/refs/tags/<tag>
for tags.