Files
e3744fb84c feat(windows): add an x86_64-windows cross target (#136)
* feat(windows): add an x86_64-windows cross target

- packages now go through forAllTargets, adding the "x86_64-windows"
  pseudo-system alongside the native ones.
- qt6.wrapQtAppsNoGuiHook is dropped for Windows and dontWrapQtApps set on
  each derivation. Both halves are needed: the hook does not evaluate for a
  mingw host, it would skip a PE anyway (wrap-qt-apps-hook.sh only handles ELF
  and Mach-O), and qtbase's setup hook hard-errors in qtPreHook without the
  flag.
- cmakeFlags pick up pkgs.logosQtCrossCmakeFlags, which is empty natively.
- meta.platforms widened to include windows.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* fix(windows): fail loudly when the generator binary is missing

The install test named only the unsuffixed `logos-cpp-generator` and had
no else-branch, so a mingw build — which produces
`logos-cpp-generator.exe` — copied nothing, succeeded, and shipped an
EMPTY $out/bin. The failure then surfaced in whichever consumer tried to
run the generator, nowhere near the cause.

Probe both names, and exit 1 with a directory listing if neither is
there. Verified: the Windows build now installs a real PE, and the
native build is unchanged.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* chore(deps): re-pin logos-nix, logos-protocol and logos-lidl to their merged revs

L1 (logos-nix) and L2 (logos-protocol, logos-lidl) are on their default
branches now, so the lock can name the merged revs instead of the pre-merge
branch tips it was resolving against while those PRs were open.

Co-authored-by: Cursor <cursoragent@cursor.com>

---------

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-11 13:51:29 -03:00

57 lines
1.9 KiB
Nix

# Common build configuration shared across all packages
{ pkgs }:
{
pname = "logos-cpp-sdk";
version = "0.2.0";
# Common native build inputs
nativeBuildInputs = [
pkgs.cmake
pkgs.ninja
pkgs.pkg-config
]
++ pkgs.lib.optional (!pkgs.stdenv.hostPlatform.isWindows) pkgs.qt6.wrapQtAppsNoGuiHook;
# Common runtime dependencies
buildInputs = [
pkgs.qt6.qtbase
pkgs.qt6.qtremoteobjects
pkgs.boost # Boost.Asio for plain-C++ TCP transports
pkgs.openssl # TLS for TcpSsl
pkgs.nlohmann_json # Wire message JSON codec
];
# Subset of buildInputs that is safe to propagate to downstream
# consumers via `propagatedBuildInputs`. Excludes Qt: qtbase's
# setup-hook fires `qtPreHook` which errors unless
# `wrapQtAppsHook` (or the no-GUI variant) was sourced first, and
# propagation order through nixpkgs (propagatedNativeBuildInputs vs
# propagatedBuildInputs) can't reliably guarantee that ordering. So
# consumers must list `qtbase` + `wrapQtAppsNoGuiHook` themselves;
# this set carries the rest (OpenSSL, Boost, nlohmann_json) so they
# don't have to retype it just to satisfy `find_dependency(...)`
# inside the SDK's CMake Config or to link against the SDK's
# transitively-required symbols (e.g.
# `boost::asio::ssl::host_name_verification`).
propagatedBuildInputs = [
pkgs.boost
pkgs.openssl
pkgs.nlohmann_json
];
# Common CMake flags
cmakeFlags = [ "-GNinja" ]
# Qt's host TOOLS (repc, moc, qmltyperegistrar) live in separate packages
# that must RUN on the build machine; logos-nix's Windows overlay exposes
# the flags pointing Qt at them. Absent -- so empty -- on native builds.
++ (pkgs.logosQtCrossCmakeFlags or [ ]);
# Metadata
meta = with pkgs.lib; {
description = "Logos C++ SDK Library and Code Generator";
platforms = platforms.unix ++ platforms.windows;
};
}