3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/applications/misc/klayout/default.nix

64 lines
1.4 KiB
Nix
Raw Normal View History

2020-03-30 01:20:41 +01:00
{ lib, mkDerivation, fetchFromGitHub, fetchpatch
2021-03-26 09:28:55 +00:00
, python3, ruby, qtbase, qtmultimedia, qttools, qtxmlpatterns
, which, perl, makeWrapper
2020-03-30 01:20:41 +01:00
}:
mkDerivation rec {
pname = "klayout";
2021-02-28 14:48:15 +00:00
version = "0.26.10";
2020-03-30 01:20:41 +01:00
src = fetchFromGitHub {
owner = "KLayout";
repo = "klayout";
rev = "v${version}";
2021-02-28 14:48:15 +00:00
sha256 = "sha256-h2jCmLZ2pRlK8VblQosBX0ZcoHDnn4oYeSqzA3y1Tzg=";
2020-03-30 01:20:41 +01:00
};
postPatch = ''
substituteInPlace src/klayout.pri --replace "-Wno-reserved-user-defined-literal" ""
patchShebangs .
'';
nativeBuildInputs = [
which
2021-03-26 09:28:55 +00:00
python3
ruby
2020-03-30 01:20:41 +01:00
];
buildInputs = [
qtbase
qtmultimedia
qttools
qtxmlpatterns
];
buildPhase = ''
runHook preBuild
mkdir -p $out/lib
./build.sh -qt5 -prefix $out/lib -j$NIX_BUILD_CORES
runHook postBuild
'';
postBuild = ''
mkdir $out/bin
mv $out/lib/klayout $out/bin/
'';
NIX_CFLAGS_COMPILE = [ "-Wno-parentheses" ];
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";
license = with licenses; [ gpl3 ];
homepage = "https://www.klayout.de/";
platforms = platforms.linux;
maintainers = with maintainers; [ knedlsepp ];
};
}