Skip to content

A simple ADC downloader for upcoming darwin goodness - #4327

Closed
copumpkin wants to merge 1 commit into
NixOS:masterfrom
copumpkin:fetchadc
Closed

copumpkin wants to merge 1 commit into
NixOS:masterfrom
copumpkin:fetchadc

Conversation

@copumpkin

Copy link
Copy Markdown
Member

ADC = Apple Developer Connection, where they host all their SDKs and other passworded downloads.

It assumes adc_user and adc_pass in config. Not sure of the best way to do this sort of thing, but this seems like a decent starting point. We can now use this to stuff xcode and friends into the nix store and package them nicely.

Reviewers: please make sure that I'm doing the right things to prevent hydra from caching things downloaded from ADC. I'm setting unfree license on the output, but I'm not sure that's sufficient.

@Fuuzetsu Fuuzetsu added the 6.topic: darwin Running or building packages on Darwin label Sep 30, 2014
@Fuuzetsu

Copy link
Copy Markdown
Member

I think you could also set meta.hydraPlatforms to [] to be extra sure but it's correct that Hydra doesn't build unfree stuff.

@copumpkin

Copy link
Copy Markdown
Member Author

Now that I think about it, unless someone goes out of their way to give Hydra credentials to access ADC, nothing bad can happen.

@copumpkin

Copy link
Copy Markdown
Member Author

Ideally, someday we'd have Hydra run with someone's credentials to test the packages, but not cache the outputs. Not sure if that's possible today.

@edolstra

edolstra commented Oct 5, 2014

Copy link
Copy Markdown
Member

I don't think this is a good idea. Packages in Nixpkgs must be installable automatically, and functions like fetchadc break that.

@copumpkin

Copy link
Copy Markdown
Member Author

What's a solution to get this behavior? It's an integral part of the pure stdenv we're building for Darwin.

On Oct 4, 2014, at 20:15, Eelco Dolstra [email protected] wrote:

I don't think this is a good idea. Packages in Nixpkgs must be installable automatically, and functions like fetchadc break that.

—
Reply to this email directly or view it on GitHub.

@copumpkin

Copy link
Copy Markdown
Member Author

The way I see it, this is necessary for this sort of unfree thing and it doesn't seem all that different from the unfree check that refuses to build anything unless you add config. Right?

On Oct 4, 2014, at 20:15, Eelco Dolstra [email protected] wrote:

I don't think this is a good idea. Packages in Nixpkgs must be installable automatically, and functions like fetchadc break that.

—
Reply to this email directly or view it on GitHub.

@cstrahan

cstrahan commented Oct 5, 2014

Copy link
Copy Markdown
Contributor

An alternative approach would be to expect that the user has the downloadable file already in the store via requireFile, like so: https://github.com/NixOS/nixpkgs/blob/40f7b0f9df5a35d56d4f44fc02067f49d104a191/pkgs/games/gsb/default.nix#L17-21

However, I do like that fetchadc will automatically fetch the file if given an ADC user/password - especially when you consider the difficulty of manually adding large large files into the nix store.

Regardless, the user need not specify the ADC user/password if they manually put the file in their store, in which case nothing is really lost by having something like fetchadc, so I think the fetchadc approach is better than just resorting to something like requireFile.

@copumpkin

Copy link
Copy Markdown
Member Author

Apologies for the bad email, was in a rush on my cellphone, but my point is just that the "installable automatically" principle is already broken for anything unfree (which refuses to install by default unless you change config), which all things going through fetchadc are by construction too. Considering how valuable this will be for those of us on darwin, I'd be inclined to push for it unless you really have a strong objection to it.

@pikajude

pikajude commented Oct 5, 2014

Copy link
Copy Markdown
Contributor

People already need ADC credentials to use nix at all considering that ADC is where you get Xcode.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: darwin Running or building packages on Darwin

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants