nixpkgs/pkgs/applications/misc/klayout/default.nix
Vladimír Čunát c778945806
Revert "Merge #101508: libraw: 0.20.0 -> 0.20.2"
I'm sorry; I didn't notice it contained staging commits.

This reverts commit 17f5305b6c, reversing
changes made to a8a018ddc0.
2020-10-25 09:41:51 +01:00

64 lines
1.4 KiB
Nix

{ lib, mkDerivation, fetchFromGitHub, fetchpatch
, python, ruby, qtbase, qtmultimedia, qttools, qtxmlpatterns
, which, perl, makeWrapper, fixDarwinDylibNames
}:
mkDerivation rec {
pname = "klayout";
version = "0.26.6";
src = fetchFromGitHub {
owner = "KLayout";
repo = "klayout";
rev = "v${version}";
sha256 = "0z17pdjdc2r2m5yi5bfz504dzzs978z8p6bhlf08v2npvigp8vz1";
};
postPatch = ''
substituteInPlace src/klayout.pri --replace "-Wno-reserved-user-defined-literal" ""
patchShebangs .
'';
nativeBuildInputs = [
which
];
buildInputs = [
python
ruby
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 ];
};
}