so that fetchurl outputs a real path instead of a source, and our
hashes match correctly between flake and non-flake.
also it looks like fetchTarball can support local files
Add supports for new type = "file" locks added in
5b8c1deb18.
Unfortunately, the hash provided by the lock file is a recursive hash,
while fetchurl wants a flat hash. So we have to use a custom fetchurl
function using the builtin:fetchurl builder. Hopefully okay just to
add compat for this very useful lock type.
Some explanation is in order:
I have tried to contact Zanculmarktum three times in the last
25 days, but I have not received any response.
Meanwhile, others are waiting to be able to use flake-compat, so
I have decided that it is best to move forward with the licensing
effort, considering that everyone else except Eelco has already
agreed, and quickly as well.
I have no hard feelings towards Zanculmarktum and I really do not
like having to make this commit.
This reverts commit e363cffac2 and
subsequent improvements.
I should note that it could be argued that their contribution was
not a creative work in the sense of most copyright law, but I'd
prefer to avoid any confusion by choosing to reimplement their
contribution in a "clean room" manner.
* `url` got renamed to `host` in Nix[1], so we have to use this key here
as well.
* It was suggested previously[2] to use the same URL to download from a
GitLab-server as Nix does.
[1] 56f1e0df05
[2] 0e29814f1e (commitcomment-42619895)
If no inputs but "self" are specified, Nix will not generate a
flake.lock at all. In this case, Flakes are mostly just used to
provide a more pure Nix experience, while sources are locked through
some other means (niv, ob thunk, manually, etc.). Supporting this is a
little weird, but it ends up working for my
repo (https://github.com/matthewbauer/nixiosk).
The goal is to filter the provided src tree based on Git tracked files
to avoid unexpected rebuild. If the provided src tree is a not valid Git
repository, no filtering is applied.