Skip to content

libfetchers/github: allow url attribute#4035

Merged
edolstra merged 2 commits intoNixOS:masterfrom
Ma27:url-attr
Sep 21, 2020
Merged

libfetchers/github: allow url attribute#4035
edolstra merged 2 commits intoNixOS:masterfrom
Ma27:url-attr

Conversation

@Ma27
Copy link
Member

@Ma27 Ma27 commented Sep 18, 2020

Since 108debe we allow a
url-attribute for the github-fetcher to fetch tarballs from
self-hosted gitlab/github instances.

However it's not used when defining e.g. a flake-input

foobar = {
    type = "github";
    url = "gitlab.myserver";
    /* ... */
}

and breaks with an evaluation-error:

error: --- Error --------------------------------------nix
unsupported input attribute 'url'
(use '--show-trace' to show detailed location information)

This patch allows flake-inputs to be fetched from self-hosted instances
as well.

Since 108debe we allow a
`url`-attribute for the `github`-fetcher to fetch tarballs from
self-hosted `gitlab`/`github` instances.

However it's not used when defining e.g. a flake-input

    foobar = {
        type = "github";
        url = "gitlab.myserver";
        /* ... */
    }

and breaks with an evaluation-error:

    error: --- Error --------------------------------------nix
    unsupported input attribute 'url'
    (use '--show-trace' to show detailed location information)

This patch allows flake-inputs to be fetched from self-hosted instances
as well.
@edolstra
Copy link
Member

url seems wrong since gitlab.server is not a valid URL. Maybe it should be server or host or something like that?

@Ma27
Copy link
Member Author

Ma27 commented Sep 21, 2020

@edolstra you're obviously right and I'm fine with a rename. I'd just like to point out that I used the name-decision that was originally taken in 108debe.

I think host is better. If you agree with this I'll update my PR accordingly.

@edolstra
Copy link
Member

Ah, sorry about that. Yes please do!

@Ma27
Copy link
Member Author

Ma27 commented Sep 21, 2020

@edolstra fixed. Please note that this needs to be fixed as well now in https://github.com/edolstra/flake-compat/blob/master/default.nix :)

@edolstra edolstra merged commit cbe0bb2 into NixOS:master Sep 21, 2020
@Ma27 Ma27 deleted the url-attr branch September 21, 2020 15:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants