Skip to content

Add basic nix support to build and develop μD3TN

Maximilian Nitsch requested to merge feature/nix-flake into master

Adds a nix flake definition file to enable building μD3TN and the python tools on NixOS as well as provide a reproducible development environment for developers.

Unfortunately nix flake doesn't like git submodules by default, because they add implicit dependencies which are not managed by nix. To work around this issue submodule support needs to be enables by adding ?submodules=1 to all nix commands.

Common commands are:

  • Build & run ud3tn:

    nix run '.?submodules=1'

  • Build individual packages:

    • nix build '.?submodules=1#ud3tn'
    • nix build '.?submodules=1#py3tn'
    • nix build '.?submodules=1#python-ud3tn-utils'
  • Load a development environment with all packages and dependencies:

    nix develop '.?submodules=1'

Edited by Maximilian Nitsch

Merge request reports