2022-03-05 16:20:37 +00:00
|
|
|
{ lib, mkDerivation, fetchFromGitHub
|
2021-04-05 15:23:46 +00:00
|
|
|
, python3, ruby, qtbase, qtmultimedia, qttools, qtxmlpatterns
|
2022-03-05 16:20:37 +00:00
|
|
|
, which, perl
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
mkDerivation rec {
|
|
|
|
pname = "klayout";
|
2023-10-19 13:55:26 +00:00
|
|
|
version = "0.28.12";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "KLayout";
|
|
|
|
repo = "klayout";
|
|
|
|
rev = "v${version}";
|
2023-10-19 13:55:26 +00:00
|
|
|
hash = "sha256-QvEoXKJ9sH5WIarYPsYEWwoFwA/pZa2etegA+AD8rPo=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace src/klayout.pri --replace "-Wno-reserved-user-defined-literal" ""
|
|
|
|
patchShebangs .
|
|
|
|
'';
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
which
|
2022-03-05 16:20:37 +00:00
|
|
|
perl
|
2021-04-05 15:23:46 +00:00
|
|
|
python3
|
|
|
|
ruby
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
qtbase
|
|
|
|
qtmultimedia
|
|
|
|
qttools
|
|
|
|
qtxmlpatterns
|
|
|
|
];
|
|
|
|
|
|
|
|
buildPhase = ''
|
|
|
|
runHook preBuild
|
|
|
|
mkdir -p $out/lib
|
2022-03-05 16:20:37 +00:00
|
|
|
./build.sh -qt5 -prefix $out/lib -option -j$NIX_BUILD_CORES
|
2020-04-24 23:36:52 +00:00
|
|
|
runHook postBuild
|
|
|
|
'';
|
|
|
|
|
|
|
|
postBuild = ''
|
|
|
|
mkdir $out/bin
|
|
|
|
mv $out/lib/klayout $out/bin/
|
2024-01-02 11:29:13 +00:00
|
|
|
|
|
|
|
install -Dm444 etc/klayout.desktop -t $out/share/applications
|
|
|
|
install -Dm444 etc/logo.png $out/share/icons/hicolor/256x256/apps/klayout.png
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2023-03-04 12:14:45 +00:00
|
|
|
env.NIX_CFLAGS_COMPILE = toString [ "-Wno-parentheses" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
dontInstall = true; # Installation already happens as part of "build.sh"
|
|
|
|
|
|
|
|
# Fix: "gsiDeclQMessageLogger.cc:126:42: error: format not a string literal
|
|
|
|
# and no format arguments [-Werror=format-security]"
|
|
|
|
hardeningDisable = [ "format" ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "High performance layout viewer and editor with support for GDS and OASIS";
|
2022-03-05 16:20:37 +00:00
|
|
|
license = with licenses; [ gpl2Plus ];
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://www.klayout.de/";
|
2022-03-05 16:20:37 +00:00
|
|
|
changelog = "https://www.klayout.de/development.html#${version}";
|
2020-04-24 23:36:52 +00:00
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = with maintainers; [ knedlsepp ];
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|