nvfetcher
nvfetcher copied to clipboard
Could `fetchGitHubRelease` work with a filename defined by regex or a function?
Something equal to
define $ package "..."
`sourceGitHub` ("...", "...")
`fetchUrl` (\(Version v) ->
fromString $
printf
"https://github.com/mayswind/AriaNg/releases/download/%s/...-%s-....zip"
v v)
fetchGitHubRelease is simply a shortcut for fetchUrl on github release files:
https://github.com/berberman/nvfetcher/blob/db780dba6923e531b5aedca502a36d3d9627fca9/src/NvFetcher/NixFetcher.hs#L146-L155
In your case, I think we can add a function fetchGitHubRelease' to the DSL that accpets (Version -> Text) rather than Text as the github release file name.