klayout: 0.30.5 -> 0.30.7

This commit is contained in:
Andreas Wendleder 2026-03-28 13:19:32 +01:00
commit 5bd069a820
No known key found for this signature in database
GPG key ID: 588785BFDFB01ABD

View file

@ -3,34 +3,45 @@
stdenv,
fetchFromGitHub,
installShellFiles,
nix-update-script,
python3,
python3Packages,
ruby,
wrapQtAppsHook,
qtbase,
qtmultimedia,
qtsvg,
qttools,
qtxmlpatterns,
qmake,
which,
perl,
libgit2,
libpng,
expat,
curl,
}:
stdenv.mkDerivation rec {
stdenv.mkDerivation (finalAttrs: {
pname = "klayout";
version = "0.30.5";
version = "0.30.7";
src = fetchFromGitHub {
owner = "KLayout";
repo = "klayout";
rev = "v${version}";
hash = "sha256-WigRictn6CxOPId2YitlEm43vEw+dSRWdoareD9HtMc=";
rev = "v${finalAttrs.version}";
hash = "sha256-W8ry1+wxVOUxg4hXMd0OpcaWcVr6wUBC3eGgDney2Xc=";
};
strictDeps = true;
postPatch = ''
substituteInPlace src/klayout.pri --replace "-Wno-reserved-user-defined-literal" ""
patchShebangs .
'';
dontUseQmakeConfigure = true;
nativeBuildInputs = [
(python3.withPackages (ps: [ ps.tomli ]))
installShellFiles
@ -38,28 +49,37 @@ stdenv.mkDerivation rec {
ruby
which
wrapQtAppsHook
qmake
qtbase
qtmultimedia
qtsvg
qttools
qtxmlpatterns
];
buildInputs = [
qtbase
qtmultimedia
qtsvg
qttools
qtxmlpatterns
libgit2
libpng
expat
curl
];
buildPhase = ''
runHook preBuild
mkdir -p $out/lib
# -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
-rpath $out/lib \
-libpng \
-libcurl \
-libexpat
runHook postBuild
'';
@ -95,13 +115,20 @@ stdenv.mkDerivation rec {
# Fix for: "gsiDeclQMessageLogger.cc: error: format not a string literal"
hardeningDisable = [ "format" ];
passthru = {
updateScript = nix-update-script { };
tests = {
pythonPackage = python3Packages.klayout;
};
};
meta = {
description = "High performance layout viewer and editor with support for GDS and OASIS";
mainProgram = "klayout";
license = with lib.licenses; [ gpl2Plus ];
homepage = "https://www.klayout.de/";
changelog = "https://www.klayout.de/development.html#${version}";
changelog = "https://www.klayout.de/development.html#${finalAttrs.version}";
platforms = lib.platforms.linux ++ lib.platforms.darwin;
maintainers = [ ];
};
}
})