Open Thesola10 opened 9 months ago
I'm not a nix expert, but I do want a bleeding-edge cling in my jupyter without having to mess with conda dev environments. This flake is built against nixpkgs' cling, which is still stuck on 0.9. Given there exist some patches to make xeus-cling compatible with upstream cling, how can I make a flake that builds against a git version of cling?
Merge this PR atop your patches and override cling
from nixpkgs to point to the latest source URL
This PR proposal adds build files for the Nix package manager, effectively turning this project into a "Nix Flake". The rationale is that C/C++ projects usually induce a lot of interference with the local build environment, which the Nix package manager alleviates.
These files let Nix build
xeus-cling
with all required dependencies, allowing one to install the kernel with a single command:nix profile install github:jupyter-xeus/xeus-cling
, and copying/linking the kernel definition files in~/.nix-profile/share/jupyter/kernels
into~/.local/share/jupyter/kernels
.(another approach for installing kernel defs would be a tiny script like
xcpp-install
that writes kernel defs in the user's Jupyter data directory.)As long as
flake.lock
is committed, all dependencies are pinned to a strict version from the upstream NixOS project. Not committing it will let dependencies update automatically, but this may make builds less reliable.This also provides another way to create a dev environment for working on
xeus-cling
: runningnix develop
, which opens a shell with the build environment Nix itself would use to build a release ofxeus-cling
.This change does not interfere with the rest of the project.