Gon Solo
2026-01-31 19:54:18 +01:00
committed by Andreas Wendleder
parent 9601286d4b
commit 85a935c358
+21 -11
View File
@@ -2,6 +2,7 @@
lib,
stdenv,
fetchFromGitHub,
installShellFiles,
python3,
ruby,
wrapQtAppsHook,
@@ -16,13 +17,13 @@
stdenv.mkDerivation rec {
pname = "klayout";
version = "0.30.4-1";
version = "0.30.5";
src = fetchFromGitHub {
owner = "KLayout";
repo = "klayout";
rev = "v${version}";
hash = "sha256-EhIGxiXqo09/p8mA00RRvKgXJncVr4qguYSPyEC0fqc=";
hash = "sha256-WigRictn6CxOPId2YitlEm43vEw+dSRWdoareD9HtMc=";
};
postPatch = ''
@@ -31,10 +32,11 @@ stdenv.mkDerivation rec {
'';
nativeBuildInputs = [
which
(python3.withPackages (ps: [ ps.tomli ]))
installShellFiles
perl
python3
ruby
which
wrapQtAppsHook
];
@@ -49,17 +51,25 @@ stdenv.mkDerivation rec {
buildPhase = ''
runHook preBuild
mkdir -p $out/lib
./build.sh -qt5 -prefix $out/lib -option -j$NIX_BUILD_CORES
# -qt5: Using Qt5 as per your previous configuration.
# -rpath: Ensures the klayout binary can find its internal libraries (tl, db, etc.)
# in the nix store without needing LD_LIBRARY_PATH.
./build.sh \
-qt5 \
-prefix $out/lib \
-option "-j$NIX_BUILD_CORES" \
-rpath $out/lib
runHook postBuild
'';
postBuild =
lib.optionalString stdenv.hostPlatform.isLinux ''
mkdir $out/bin
install -Dm444 etc/klayout.desktop -t $out/share/applications
install -Dm444 etc/logo.png $out/share/icons/hicolor/256x256/apps/klayout.png
mv $out/lib/klayout $out/bin/
installBin $out/lib/klayout
''
+ lib.optionalString stdenv.hostPlatform.isDarwin ''
mkdir -p $out/Applications
@@ -79,10 +89,10 @@ stdenv.mkDerivation rec {
env.NIX_CFLAGS_COMPILE = toString [ "-Wno-parentheses" ];
dontInstall = true; # Installation already happens as part of "build.sh"
# Installation is handled manually in buildPhase/postBuild via build.sh -prefix
dontInstall = true;
# Fix: "gsiDeclQMessageLogger.cc:126:42: error: format not a string literal
# and no format arguments [-Werror=format-security]"
# Fix for: "gsiDeclQMessageLogger.cc: error: format not a string literal"
hardeningDisable = [ "format" ];
meta = {