-
Notifications
You must be signed in to change notification settings - Fork 399
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
chore(nix): support build for experimental feature #10845
Conversation
1412a86
to
2aa669b
Compare
Heads up that I pushed a commit that fixes the failing nix test. |
I pushed another change to remove the duplication of the experimental flags. |
I think it's simpler and more idiomatic to use |
22c38a4
to
0eb22e6
Compare
how does it look @maiste ? I did a quick test and it seems to work but I'm not super familiar with the experimental flags so let me know if the resulting binaries work as you expect |
On @gridbugs and my computer, the produced binary works as expected:
EDIT: I didn't realize I didn't update the branch before trying. I retried with the |
Nice work @emillon, I didn't know about |
I have rebased and cleaned the history. If the tests pass, I think it's ok to merge it 👍 |
The part that made it click for me is this comment - derivations are { stdenv, bar, baz }: # this part gets overriden by `override`
stdenv.mkDerivation { # This part gets overriden by overrideAttrs
pname = "test";
version = "0.0.1";
buildInputs = [bar baz];
phases = ["installPhase"];
installPhase = "touch $out";
} |
Use `overrideAttrs` to change the behaviour and export new target `dune-experimental` and `dune-static-experimental` Co-authored-by: Etienne Millon <me@emillon.org> Signed-off-by: Stephen Sherratt <stephen@sherra.tt> Signed-off-by: Etienne Marais <dev@maiste.fr> Signed-off-by: Etienne Millon <me@emillon.org>
Following the merge of #10724, I have written this PR so we are able to build the executable using Nix Flake. I'm far from being a Nix expert, so if someone with a better expertise is able to reduce the amount of code, it would be happy to change the code 😄
EDIT: Replace my solution with @gridbugs' one, as it is simpler and more elegant one. It consists in adding a function to the package default that could take some flags.