-
Notifications
You must be signed in to change notification settings - Fork 913
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
build: add a simple nix dev shell #6739
build: add a simple nix dev shell #6739
Conversation
f095798
to
da7c008
Compare
da7c008
to
901135c
Compare
da7fcc1
to
9199c38
Compare
1eefc12
to
482df12
Compare
e4b9e27
to
f50504a
Compare
This comment was marked as outdated.
This comment was marked as outdated.
aebc8f5
to
851c172
Compare
c9d9462
to
f6dd1cd
Compare
I wonder if we should rather build a flake rather than an env or a shell. That'd allow us to pull in other flakes from arbitrary sources, and more importantly pull CLN in as a flake themselves. |
This is a good point, I can move to Nix Flake or maybe we can just adapt the nix-shell into a nix flake. However, I am having a hard time resolving the Python Nix bundle. I will make some experiments, thanks for the suggestion |
4a449a5
to
690de03
Compare
Discussing somewhere else about the complexity of getting the python dependencies in, I was wondering if it'd make sense to have nix manage |
This is a good things to do IMHO, and I think also the only one because there is a bug on nix. I was testing it but I do not remember why I changed maybe due the nix env variable, but I can play with it after the release is over. |
I am tempted to move this to the next release (or between releases as it does not touch core-lightning itself). |
Yeah currently there is no way to build a nix-shell with poetry2nix because there is a bug and we should wait for a fix. Happy to move it |
Removed the milestone as this PR is not ready to be merged in its current state. |
Signed-off-by: Vincenzo Palazzo <[email protected]>
Introducing the nix-shell configuration file. There is also a new experimental feature in nix/nixos that is nix flake [1]. The reason that this commit is including a default.nix that is the normal nix-shell [2] is that it is the most well known and also what we need in cln. In fact, in cln we need just a way to have an env shell with all the dependencies, and then allow the user/developer to work with the normal workflow documented inside our docs. [1] https://nixos.wiki/wiki/Flakes [2] https://nixos.org/manual/nix/stable/command-ref/nix-shell Signed-off-by: Vincenzo Palazzo <[email protected]>
Signed-off-by: Vincenzo Palazzo <[email protected]>
Signed-off-by: Vincenzo Palazzo <[email protected]>
690de03
to
2c768f5
Compare
This nix to be reworked |
I've had these changes on a branch for some time and have been considering preparing a patch and pushing it.
Essentially, this enables any NixOS or Nix package manager user to launch a development shell with all the necessary dependencies. This allows CLN users to contribute, compile, and install CLN. The process can be a bit intricate due to our use of shared libraries. This update might also enhance the OSX build, though I haven't been able to test it currently.
The documentation has been updated as well, as it previously didn't work on a fresh NixOS machine. In the latest commit, I've added myself as the code owner to assist in maintaining this configuration.
This approach differs from #6650. Their method offers a more intricate Nix configuration that employs Nix to execute the
make
target. While I might be oversimplifying, I believe their approach is excessive for our needs.