nvfetcher icon indicating copy to clipboard operation
nvfetcher copied to clipboard

Could `fetchGitHubRelease` work with a filename defined by regex or a function?

Open Vonfry opened this issue 3 years ago • 1 comments

Something equal to

  define $ package "..."
      `sourceGitHub` ("...", "...")
      `fetchUrl` (\(Version v) ->
        fromString $
            printf
            "https://github.com/mayswind/AriaNg/releases/download/%s/...-%s-....zip"
            v v)

Vonfry avatar May 15 '22 14:05 Vonfry

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.

berberman avatar Jun 09 '22 20:06 berberman