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

44 lines
1.2 KiB
Nix

# Builds the logos-cpp-sdk package: the Qt-free, header-only base SDK
# (logos_module_context.h / logos_result.h / logos_json.h) exported as the
# CMake INTERFACE target logos-cpp-sdk::logos_headers.
{ pkgs, common, src, logos-protocol }:
pkgs.stdenv.mkDerivation {
pname = "${common.pname}-lib";
# qtbase\'s setup hook errors in qtPreHook unless a wrapper hook ran or
# this is set; the wrapper hooks are absent on Windows (they cannot even
# evaluate for a mingw host) and would skip a PE anyway.
dontWrapQtApps = true;
version = common.version;
inherit src;
inherit (common) cmakeFlags meta;
# Header-only: no Qt, no transports. nlohmann_json is the single
# dependency (the headers use it), propagated so consumers' CMake
# find_dependency(nlohmann_json) resolves.
nativeBuildInputs = [ pkgs.cmake pkgs.ninja ];
buildInputs = [ pkgs.nlohmann_json ];
propagatedBuildInputs = [ pkgs.nlohmann_json ];
dontUseCmakeConfigure = true;
buildPhase = ''
runHook preBuild
mkdir -p build-sdk
cd build-sdk
cmake ../cpp -GNinja -DCMAKE_INSTALL_PREFIX=$out $cmakeFlags
ninja
cd ..
runHook postBuild
'';
installPhase = ''
runHook preInstall
cmake --install build-sdk
runHook postInstall
'';
}