-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
nix: add example on how to use a library locally #3337
Conversation
nix/overlays/haskell-packages.nix
Outdated
# | ||
# To try a modified library locally (for development purposes only), see this gist as example: | ||
# https://gist.github.com/laurenceisla/de88d975b894074c989feffa0c5611cc | ||
# |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think is the wrong place to put it. And I think we shouldn't link to a gist there.
How about just adding a section to nix/README.md
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, I get it. Only production ready examples should be used there.
OK, I'll be adding a new section to that README.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@wolfgangwalther @laurenceisla For Locality of Behaviour, how about keeping this comment on the nix/overlays/haskell-packages.nix
?
It'll be much better if anyone can just read the file and then find the way.. I've also had this use case many times.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Your workflow happens to be to start looking in this file, because you have learned in the past that you will need to touch this file to tell nix about haskell dependencies. But as I said earlier: Managing dependencies should start somewhere else.
The link describes changes to this file, cabal.project, stack.yaml and a copy of another repo entirely. It's just one of the files that is changed here, this is not about this file. This is really something for a "developer documentation" - and nix/README.md
is the closest we have, even though this is not about nix only.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
However: Instead of me telling you "you're doing it wrong" all the time ;)... maybe we can add a hint with this kind of explanation to the overlay file? I.e. something along the times "note, that this shouldn't be the first place to start adding dependencies to, also have a look here and there" etc.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
However: Instead of me telling you "you're doing it wrong" all the time ;)...
I like being told I'm wrong! 😄
maybe we can add a hint with this kind of explanation to the overlay file?
Sounds good!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe we can add a hint with this kind of explanation to the overlay file?
Did that, not sure if more info is needed here. Added a mention to the Nix README too, for local packages.
5aa004b
to
8c070e8
Compare
8c070e8
to
744d3b4
Compare
Co-authored-by: Wolfgang Walther <wolfgangwalther@users.noreply.github.com>
Added an example on how to use a local library for development purposes. Useful to debug said library in the context of PostgREST development.