From 37edb33d925d959d07a55ad861c5b9313aeae28f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Tue, 12 Jan 2021 12:18:50 +0100 Subject: [PATCH] xsd: modernize build --- pkgs/development/libraries/xsd/default.nix | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/pkgs/development/libraries/xsd/default.nix b/pkgs/development/libraries/xsd/default.nix index 7541ee427045..3388666f46b3 100644 --- a/pkgs/development/libraries/xsd/default.nix +++ b/pkgs/development/libraries/xsd/default.nix @@ -1,9 +1,8 @@ { stdenv, fetchurl, xercesc }: let - fixed_paths = ''LDFLAGS="-L${xercesc}/lib" CPPFLAGS="-I${xercesc}/include"''; in -stdenv.mkDerivation { +stdenv.mkDerivation rec { pname = "xsd"; version = "4.0.0"; @@ -14,20 +13,22 @@ stdenv.mkDerivation { patches = [ ./xsdcxx.patch ]; - configurePhase = '' + postPatch = '' patchShebangs . ''; - buildPhase = '' - make ${fixed_paths} - ''; + enableParallelBuilding = true; + + buildFlags = [ + "LDFLAGS=-L${xercesc}/lib" + "CPPFLAGS=-I${xercesc}/include" + ]; + installFlags = buildFlags ++ [ + "install_prefix=${placeholder "out"}" + ]; buildInputs = [ xercesc ]; - installPhase = '' - make ${fixed_paths} install_prefix="$out" install - ''; - meta = { homepage = "http://www.codesynthesis.com/products/xsd"; description = "An open-source, cross-platform W3C XML Schema to C++ data binding compiler";