Conversation
|
@zimbatm, thanks for your PR! By analyzing the history of the files in this pull request, we identified @krgn, @wkennington and @peterhoeg to be potential reviewers. |
|
👍 i imagine there are many other situations where also do we need to document this? are other fetch* functions documented? |
|
The name |
There was a problem hiding this comment.
Passing functions as strings seems really ugly to me...
Also, there is nothing in the fetchdata function specific to fetching. Rather it's a generic "call a function specified by the 'fetcher' argument". But such a function doesn't sound like a good idea to me. Why write f { fetcher = "g"; args... } when I can write g args directly?
There was a problem hiding this comment.
Yeah, not very nice. Clearly the goal is to be able to write in "nixon", i.e. without function calls.
There was a problem hiding this comment.
Would it be more compelling if I replaced it with a type attribute such that type = "git" would map to the fetchgit fetcher and so on?
|
Thanks for the reviews! I realize my vision isn't complete here and it's more of a 20% review. The problem I am trying to solve is that it takes a lot of time to update packages. Most of the time it's enough to bump the version and update the sha256 but right now it's hard to automate that because the data is mixed with the mkDerivation bits. First bump the version, then run Right now all I am doing in this PR is to move all the data into a pure nix (NIXON) declaration (which explain why fetcher is also a string) with the idea that in a further PRs I will be able to move that out to a separate file. I also converted a couple of files to I want us to get into a situation where the source data can live in a separate file (eg: If we can agree on the What do you think? |
|
@garbas for now my approach to finding multi-arch binaries is to grep for |
|
Moving the discussion to #19582. I will come back with a more complete solution with my updating script idea. |
Motivation for this change
Moving the fetch data into pure NIXON code means we can more easily write update scripts. The updating part is still missing though.
The second motivation is that it's currently painful to update sha256s with multi-arch sources (binary packages). With
fetchmultiit's possible to donix-prefetch-url . -A mypackage.src.alland get all the hashes out.Things done
(nix.useSandbox on NixOS,
or option
build-use-sandboxinnix.confon non-NixOS)
nix-shell -p nox --run "nox-review wip"./result/bin/)/cc @garbas @kamilchm @domenkozar