Skip to content

Redesign flake outputs#18

Merged
Sobottasgithub merged 2 commits into
developfrom
redesign_packages
May 14, 2026
Merged

Redesign flake outputs#18
Sobottasgithub merged 2 commits into
developfrom
redesign_packages

Conversation

@TureBentzin
Copy link
Copy Markdown
Collaborator

The nix flake now has individual build outputs for each submodule of the project and no longer "fakes" the behavior by just changing the default executable. A "traditional" tablo-full package that builds everything together and lets CMake handle dependencies still exists.

@TureBentzin TureBentzin marked this pull request as draft May 14, 2026 19:42
@TureBentzin TureBentzin changed the base branch from main to develop May 14, 2026 19:43
@TureBentzin TureBentzin marked this pull request as ready for review May 14, 2026 19:43
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR restructures the Nix/CMake packaging so individual Tablo components and libraries can be built as separate flake outputs, while preserving a combined tablo-full package.

Changes:

  • Adds CMake build options for selectively enabling libraries and executables.
  • Expands flake outputs for individual libraries, executables, Docker images, and a joined default package.
  • Renames Methods to METHODS across networking code and removes the old TCTest target.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
CMakeLists.txt Adds build flags to conditionally include libraries and executables.
TCTest/CMakeLists.txt Removes the old tabcrypt test executable target.
TCTest/src/main.cpp Removes the tabcrypt test executable implementation.
TCTest/src/tabcrypt_test.h Removes the tabcrypt test helper header.
TabloClient/CMakeLists.txt Adds ttp2 to client link libraries.
TabloClient/src/utils/networking.cpp Updates protocol enum references to METHODS.
TabloMaster/CMakeLists.txt Adds ttp2 to master link libraries.
TabloMaster/src/utils/client_session_controller.cpp Updates protocol enum references to METHODS.
TabloMaster/src/utils/networking.cpp Updates handshake enum reference and removes a debug log.
TabloMaster/src/utils/node_session_controller.cpp Updates protocol enum references and removes debug logs.
TabloMaster/src/utils/udp_discovery.cpp Updates discovery protocol enum references.
TabloNode/CMakeLists.txt Adds ttp2 to node link libraries.
TabloNode/src/utils/networking.cpp Updates protocol enum references and removes debug logs.
TabloNode/src/utils/udp_discovery.cpp Updates discovery protocol enum references.
TabloNode/src/utils/worker.cpp Updates worker protocol enum references and removes test logging.
lib/libtabnet/include/methods.h Renames the public protocol enum type.
flake.nix Adds ttp2, defines split package outputs, Docker image outputs, and default joined package.
flake.lock Locks the new ttp2 input and its nixpkgs input.
Comments suppressed due to low confidence (1)

flake.nix:136

  • Enabling both library subdirectories here makes the tablo-master output install libtabcrypt, libtabnet, and their headers in addition to the master binary, while the flake also exposes separate libtabcrypt/libtabnet outputs and joins them into tablo. That duplicates the same lib/ and include/ paths in multiple outputs and can make the joined default package collide; build only the master target against the separate library outputs instead.
            enableMaster = true;
            enableLibtabcrypt = true;
            enableLibtabnet = true;

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread flake.nix
libttp2
;

default = tablo;
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is actually an issue. Please open an issue for it @copilot

Comment thread flake.nix

installPhase = ''
cmake --install build --prefix=$out
cp LICENSE $out/
Comment thread flake.nix
Comment on lines +121 to +123
enableClient = true;
enableLibtabcrypt = true;
enableLibtabnet = true;
Comment thread flake.nix
packages.${system} =
let
tablo-full = pkgs.stdenv.mkDerivation {
mkTabloPackage =
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is so smooth!

Copy link
Copy Markdown
Owner

@Sobottasgithub Sobottasgithub left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow! This flake is so beautifully implemented!
Thank you :)

@Sobottasgithub Sobottasgithub merged commit 489f77a into develop May 14, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants