From 3d0c9ba59932643778f1bfa3d6adce2db72703d2 Mon Sep 17 00:00:00 2001 From: Robert Helgesson Date: Mon, 5 Sep 2016 21:52:04 +0200 Subject: [PATCH] opencascade: fix build --- .../libraries/opencascade/default.nix | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/pkgs/development/libraries/opencascade/default.nix b/pkgs/development/libraries/opencascade/default.nix index 8a7f9970e657..51581bca382d 100644 --- a/pkgs/development/libraries/opencascade/default.nix +++ b/pkgs/development/libraries/opencascade/default.nix @@ -9,16 +9,25 @@ stdenv.mkDerivation rec { buildInputs = [ cmake mesa tcl tk file libXmu qt4 freetype ]; - preUnpack = '' - sourceRoot=`pwd`/ros/adm/cmake - cmakeFlags="$cmakeFlags -DINSTALL_DIR=$out -D3RDPARTY_TCL_DIR=${tcl} -D3RDPARTY_FREETYPE_DIR=${freetype.dev}" - ''; + sourceRoot = "ros/adm/cmake"; + + cmakeFlags = [ + "-D3RDPARTY_TCL_DIR=${tcl}" + "-D3RDPARTY_FREETYPE_DIR=${freetype.dev}" + + # Not used on Linux but must be defined during configuration. + "-D3RDPARTY_FREETYPE_DLL=${freetype.dev}" + ]; # https://bugs.freedesktop.org/show_bug.cgi?id=83631 NIX_CFLAGS_COMPILE = "-DGLX_GLXEXT_LEGACY"; hardeningDisable = [ "format" ]; + preConfigure = '' + cmakeFlags="$cmakeFlags -DINSTALL_DIR=$out" + ''; + postInstall = '' mv $out/inc $out/include mkdir -p $out/share/doc/${name}