From a8c07163dc9d62c9d1156e44501f2af095fec607 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Tue, 12 Jan 2021 12:18:19 +0100 Subject: [PATCH 1/2] xsd: fix build last release 2014... does not build with gcc10 --- pkgs/top-level/all-packages.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 264fe101a513..eab5ce66db05 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -25681,7 +25681,9 @@ in xrgears = callPackage ../applications/graphics/xrgears { }; - xsd = callPackage ../development/libraries/xsd { }; + xsd = callPackage ../development/libraries/xsd { + stdenv = gcc9Stdenv; + }; xscope = callPackage ../applications/misc/xscope { }; 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 2/2] 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";