-
-
Notifications
You must be signed in to change notification settings - Fork 419
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
Feature: Added nix build support #603
Feature: Added nix build support #603
Conversation
Thanks! +CC @IvarWithoutBones who made the default.nix in nixpkgs: @dev-null-undefined, thank you very much! I don't know nix. For now, I did:
To merge this patch, and do some due dilligence. I would like to verify myself. What step should I follow to depend on ftxui using this config and nix? |
I decided against defining this as default package for you to build this you would have to run |
But it could be that I am mistaking in not defining defaultPackage it would probably also make sense to add default.nix for those with out nix experimental features enabled |
It would also make sense to a change the default cmakelist (in the docs) since when building under nix you do not have network connection for purity reasons. |
Why didn't you tell me about that nix config in nixpkgs :D i didn't even notice it until now 😂 |
It works! Thanks!
I discovered it after your patch, while trying to learn nix. Question: Why do we need a devshell? |
For testing without having to compile the ftxui your self (nix will use the cached version instead), you can also append all build tools that are used by this for example doxygen cmake gcc and others if needed (graphviz, valgrind, formatter?) and make it into very simple single command dev environment. And also because of the way that nix builds packages, it will not reuse object files from past compilations which will make it compile the whole project from scratch meaning that even the simplest change can take several minutes to build. And it also provided a way to specify custom commands such as the compile (alias, function) that I have provided as example. This is just a draft for that exact reason, this is how I would do it but I do not know this project very well for me to make any of those decisions. |
But dev shells are not the main objective over here, those could be added only to the example project if you feel like they are more distraction then they are benefit to this project. Mainly I would love the CMakelist.txt to change in the docs and maybe even the flake.nix, even if it would be without the dev shells, being merged so that we can get the new version on nix as well. And others can easily use this lib with nix. |
I am now sufficiently up-to-date with nix to understand the current patch. What do you think? |
Co-authored-by: ArthurSonzogni <sonzogniarthur@gmail.com>
Not sure if this will work, but basic example seems to be working.
Can you confirm that this lib has no dependencies and no absolute path.
Closes #598