nixpkgs-suyu/pkgs/applications/misc/klayout/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

66 lines
1.5 KiB
Nix
Raw Normal View History

2022-03-02 20:08:18 +01:00
{ lib, mkDerivation, fetchFromGitHub
2021-03-26 10:28:55 +01:00
, python3, ruby, qtbase, qtmultimedia, qttools, qtxmlpatterns
2022-03-02 20:08:18 +01:00
, which, perl
2020-03-30 02:20:41 +02:00
}:
mkDerivation rec {
pname = "klayout";
2022-03-02 20:08:18 +01:00
version = "0.27.8";
2020-03-30 02:20:41 +02:00
src = fetchFromGitHub {
owner = "KLayout";
repo = "klayout";
rev = "v${version}";
2022-03-02 20:08:18 +01:00
hash = "sha256-t/nd7m8XpB026q/kyH16rKkw3qza19ISalB0Juzx4NU=";
2020-03-30 02:20:41 +02:00
};
postPatch = ''
substituteInPlace src/klayout.pri --replace "-Wno-reserved-user-defined-literal" ""
patchShebangs .
'';
nativeBuildInputs = [
which
2022-03-02 20:08:18 +01:00
perl
2021-03-26 10:28:55 +01:00
python3
ruby
2020-03-30 02:20:41 +02:00
];
buildInputs = [
qtbase
qtmultimedia
qttools
qtxmlpatterns
];
buildPhase = ''
runHook preBuild
mkdir -p $out/lib
2022-03-02 20:08:18 +01:00
./build.sh -qt5 -prefix $out/lib -option -j$NIX_BUILD_CORES
2020-03-30 02:20:41 +02:00
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";
2022-03-02 20:08:18 +01:00
license = with licenses; [ gpl2Plus ];
2020-03-30 02:20:41 +02:00
homepage = "https://www.klayout.de/";
2022-03-02 20:08:18 +01:00
changelog = "https://www.klayout.de/development.html#${version}";
2020-03-30 02:20:41 +02:00
platforms = platforms.linux;
maintainers = with maintainers; [ knedlsepp ];
};
}