-
Notifications
You must be signed in to change notification settings - Fork 325
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
Generate/write nix derivations for all the haskell code #2331
Conversation
This seems to be missing from the PR |
83ecc9a
to
b69ef65
Compare
Added it now. |
cabalFiles=$(find "$ROOT_DIR" -name '*.cabal' \ | ||
| grep -v dist-newstyle) |
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.
Use find -not -name
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.
Might have to use -not -path
instead, since I think dist-newstyle
doesn't appear in the final path component ("name"). Alternatively, you could type \( -type d -name dist-newstyle -prune \) -o ...
to avoid walking those directories at all, if you are just worried about directories with that specific name and not something like "indist-newstyler.cabal".
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.
\( -type d -name dist-newstyle -prune \) -o ...
doesn't seem to work and -not -path
requires wildcards anyway. I think I will just leave it like this and hope nobody creates indist-newstyler.cabal
or anything like that!
How much of this is generated vs. written? I naturally recoil at treating anything generated as source code and checking it in, though I certainly understand it's the path of least resistence in some cases. |
All the new files in the PR except |
A few questions, sorry if they are dumb, but I still struggle with nix things.
|
There exists a
The
We want to not rely on We could also try to get rid of the |
@@ -0,0 +1,18 @@ | |||
#!/usr/bin/env bash |
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.
Can we put this in a less hacky location, and add a toplevel comment to all shellscripts, explaining what they do and how /when they're supossed to be called?
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.
What a less hacky location?
841292d
to
4b8adaa
Compare
fast used to point to default when used with cabal anyway.
It helps with not having to run cabal2nix over and over again in CI.
This reverts commit 660b12e. Doesn't really give us anything
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.
Thanks for all the comments! I'm curious to see how well this nixified approach will work out going forward.
* Makefile: Avoid building haddocks while building production images * Add changelog for nix builds, forgotten in #2331
Major changes:
cabal.project
, we pin them innix/haskell-pins.nix
. This allows us to share built artefacts among the team and helps us avoid problems of compiling things with newer C libraries because cabal doesn't invalidate the built artefacts in the cabal-store.dockerTools.streamLayeredImage
. This allows us to build minimal images without needing a docker daemon to be running. This also helps us cache most of our images in the nix cache.make regen-local-nix-derivations
. This will update various nix derivations we have for our project. This is protected bymake check-local-nix-derivations
which runs as a dependency ofmake lint-all
in CI.Usual development workflow shouldn't change if you were already using nix provided development environment. In case you face any problems deleting one or all of these directories from the root of the project might fix your issues:
.env
dist-newstyle