Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add sha256hash to input attrs for eval. #622

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kquick
Copy link
Contributor

@kquick kquick commented Dec 12, 2018

This makes the sha256 hash of the input available to the evaluation process, which is useful in cases where this evaluation generates a fetchgit for a subsequent build.

@grahamc
Copy link
Member

grahamc commented Mar 18, 2019

Can you share an example usage?

@minijackson
Copy link
Member

I'm needing this. My usecase is that I want to generate a channel that follows multiple git repositories. Because the packages need to be reproducible from source, I need a fetchgit for each package in the channel. So what I've figured I should do is in the patchPhase of my channel job, I generate the arguments for each of my package's src's fetchgit. Since this is Hydra is making this pure, I must deduce these parameters from Hydra's args. (Please tell me if the wording is confusing)

@kquick
Copy link
Contributor Author

kquick commented Jul 17, 2019

Whoops, forgot about this one. The use case I had was very similar to what @minijackson describes although it was related to git fetching an input without submodules to drive cabal2nix generation of nix descriptions for haskell packages obtained from git repos.

Since that time however we shifted strategy and no longer directly need this input, but it still seems like this could be generally useful. It's not secret information and it's already gathered by the eval process... it's just a matter of passing this as part of the input information to the job.

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.

None yet

3 participants