Skip to content

Add shellHook option to components (and packages and plans) #117

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

Merged

Conversation

eamsden
Copy link
Contributor

@eamsden eamsden commented May 8, 2019

I am going to test this soon but my build machines are consumed by cross-compiling. This adds a way to specify shellHooks at plan, package, and component levels, in answer to #114

@eamsden
Copy link
Contributor Author

eamsden commented May 8, 2019

@rvl @angerman

@angerman
Copy link
Collaborator

@eamsden so wait, we already had a shellHook at the package level but not at the component level? And the effect was just that it wasn't used?

@eamsden
Copy link
Contributor Author

eamsden commented May 14, 2019

@angerman

No, the component builder took an optional shellHook input, but it wasn't passed anywhere. I just added a shellHook option to the list of options that gets replicated at the plan, package, and component levels, and pushed down. Then I made component-builder.nix pass the component shellHook config to the builder as an argument.

So now you can configure shellHook at any level in the same way as (say) setupBuildFlags.

@eamsden eamsden marked this pull request as ready for review May 16, 2019 15:42
@eamsden
Copy link
Contributor Author

eamsden commented May 16, 2019

I've tested this and gotten working shellHooks. I think it is ready for you to look at @angerman

@eamsden eamsden changed the title [Untested] Add shellHook option to components (and packages and plans) Add shellHook option to components (and packages and plans) May 16, 2019
@@ -73,6 +73,11 @@ let
type = bool;
default = (def.doHaddock or true);
};
shellHook = mkOption {
description = "Hook to run when entering a shell";
type = unspecified; # Can be either a string or a function
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess we could craft a custom type. But for now this is porbably good enough.

@angerman angerman merged commit 413d5c9 into input-output-hk:master May 17, 2019
andreabedini pushed a commit to andreabedini/haskell.nix that referenced this pull request Sep 14, 2022
* Fix union version ranges

* Fixes for latest aeson
andreabedini pushed a commit to andreabedini/haskell.nix that referenced this pull request Sep 14, 2022
* Fix union version ranges

* Fixes for latest aeson
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.

2 participants