Install Nix package manager. I suggest using a clean Virtual Machine (VM) with Ubuntu on it. You can install Nix using the instructions from here, which is pretty much just the commandYou need NixOS. Nix package manager on non-NixOS can't connect graphical apps to the correct graphics libraries.curl https://nixos.org/nix/install | sh
. You might have to log out and in again to set some environment variables.- Clone this repo and submodules,
git clone --recurse-submodules https://github.com/marcus7070/cq-dev
cd cq-dev
- Run the command
nix-build
, this should build both CadQuery and CQ-editor, and place a symlink to the result in this directory. The first time you run this command it will build many things and take a long time, but Nix's caching and optimisation are excellent, subsequent builds will be very fast. - Run
./result/bin/cq-editor
- To create docs, run
nix-build -E 'let pkgs = import <nixpkgs> { config = {}; overlays = [ (import ./overlay.nix) ];}; in pkgs.python3Packages.cadquery.doc' --keep-failed
Feel free to change the CadQuery or CQ-editor source code. Just rerun nix-build
when you are done. Nix should take a hash of the source code, and if it's changed it will rebuild it.
Running nix-shell in this directory will pick up shell.nix
and produce an environment with the cadquery package present. Then editors such as Vim with Python-language-server will pick up CadQuery and offer autocomplete and hinting etc.
Unfortunately PyQt5 isn't currently working in Nix, so CQ-editor's tests have been disabled.