Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

klayout: init at 0.26.2 #73941

Merged
merged 1 commit into from Mar 30, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
63 changes: 63 additions & 0 deletions pkgs/applications/misc/klayout/default.nix
@@ -0,0 +1,63 @@
{ lib, mkDerivation, fetchFromGitHub, fetchpatch
, python, ruby, qtbase, qtmultimedia, qttools, qtxmlpatterns
, which, perl, makeWrapper, fixDarwinDylibNames
}:

mkDerivation rec {
pname = "klayout";
version = "0.26.2";

src = fetchFromGitHub {
owner = "KLayout";
repo = "klayout";
rev = "v${version}";
sha256 = "0svyqayvr45snqw0dhx6jpnjhg4qb097pz28s8k1crx5i31nnd94";
};

postPatch = ''
substituteInPlace src/klayout.pri --replace "-Wno-reserved-user-defined-literal" ""
patchShebangs .
'';

nativeBuildInputs = [
which
];

buildInputs = [
python
jonringer marked this conversation as resolved.
Show resolved Hide resolved
ruby
qtbase
qtmultimedia
qttools
qtxmlpatterns
];

buildPhase = ''
runHook preBuild
mkdir -p $out/lib
./build.sh -qt5 -prefix $out/lib -j$NIX_BUILD_CORES
jonringer marked this conversation as resolved.
Show resolved Hide resolved
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 ];
};
}

2 changes: 2 additions & 0 deletions pkgs/top-level/all-packages.nix
Expand Up @@ -19601,6 +19601,8 @@ in

kiwix = callPackage ../applications/misc/kiwix { };

klayout = libsForQt5.callPackage ../applications/misc/klayout { };

kmplayer = libsForQt5.callPackage ../applications/video/kmplayer { };

kmymoney = libsForQt5.callPackage ../applications/office/kmymoney {
Expand Down