From 26f08b592bfd9f5f4d1b5ae01d09973f8ab43059 Mon Sep 17 00:00:00 2001 From: Abdelhakim Qbaich Date: Sat, 4 Apr 2026 20:01:10 -0400 Subject: [PATCH] klayout: 0.30.7 -> 0.30.8 using Qt6 --- pkgs/applications/misc/klayout/default.nix | 33 +++++++++++++--------- pkgs/top-level/all-packages.nix | 2 +- 2 files changed, 20 insertions(+), 15 deletions(-) diff --git a/pkgs/applications/misc/klayout/default.nix b/pkgs/applications/misc/klayout/default.nix index 66e579f3010a..be1903c6310f 100644 --- a/pkgs/applications/misc/klayout/default.nix +++ b/pkgs/applications/misc/klayout/default.nix @@ -7,40 +7,41 @@ python3, python3Packages, ruby, - wrapQtAppsHook, - qtbase, - qtmultimedia, - qtsvg, - qttools, - qtxmlpatterns, - qmake, which, perl, libgit2, libpng, expat, curl, + zlib, + wrapQtAppsHook, + qmake, + qtbase, + qtmultimedia, + qtsvg, + qttools, + qt5compat, }: stdenv.mkDerivation (finalAttrs: { pname = "klayout"; - version = "0.30.7"; + version = "0.30.8"; src = fetchFromGitHub { owner = "KLayout"; repo = "klayout"; rev = "v${finalAttrs.version}"; - hash = "sha256-W8ry1+wxVOUxg4hXMd0OpcaWcVr6wUBC3eGgDney2Xc="; + hash = "sha256-RjMH6hrc0jyCLgG1D6cztBp5Fb3W5HgTxVTfI2bxgCs="; }; strictDeps = true; postPatch = '' - substituteInPlace src/klayout.pri --replace "-Wno-reserved-user-defined-literal" "" - patchShebangs . + patchShebangs --build . ''; dontUseQmakeConfigure = true; + dontWrapQtApps = stdenv.hostPlatform.isDarwin; nativeBuildInputs = [ (python3.withPackages (ps: [ ps.tomli ])) @@ -54,7 +55,7 @@ stdenv.mkDerivation (finalAttrs: { qtmultimedia qtsvg qttools - qtxmlpatterns + qt5compat ]; buildInputs = [ @@ -62,11 +63,12 @@ stdenv.mkDerivation (finalAttrs: { qtmultimedia qtsvg qttools - qtxmlpatterns + qt5compat libgit2 libpng expat curl + zlib ]; buildPhase = '' @@ -107,7 +109,10 @@ stdenv.mkDerivation (finalAttrs: { wrapQtApp "$out/Applications/klayout.app/Contents/MacOS/klayout" ''; - env.NIX_CFLAGS_COMPILE = toString [ "-Wno-parentheses" ]; + env = { + NIX_CFLAGS_COMPILE = toString [ "-Wno-parentheses" ]; + NIX_LDFLAGS = lib.optionalString stdenv.hostPlatform.isDarwin "-headerpad_max_install_names"; + }; # Installation is handled manually in buildPhase/postBuild via build.sh -prefix dontInstall = true; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index e04af46a5ff5..2608a84d146e 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -9661,7 +9661,7 @@ with pkgs; k4dirstat = libsForQt5.callPackage ../applications/misc/k4dirstat { }; - klayout = libsForQt5.callPackage ../applications/misc/klayout { }; + klayout = qt6Packages.callPackage ../applications/misc/klayout { }; kotatogram-desktop = callPackage ../applications/networking/instant-messengers/telegram/kotatogram-desktop