xalanc: enable on Darwin

This commit is contained in:
Dan Peebles 2017-04-25 17:48:26 -04:00
parent ba974d4b74
commit 91f55f4e8a

View File

@ -1,6 +1,10 @@
{ stdenv, fetchurl, xercesc }: { stdenv, fetchurl, xercesc, getopt }:
stdenv.mkDerivation rec { let
platform = if stdenv.isLinux then "linux" else
if stdenv.isDarwin then "macosx" else
throw "Unsupported platform";
in stdenv.mkDerivation rec {
name = "xalan-c-${version}"; name = "xalan-c-${version}";
version = "1.11"; version = "1.11";
@ -9,20 +13,21 @@ stdenv.mkDerivation rec {
sha256 = "0a3a2b15vpacnqgpp6fiy1pwyc8q6ywzvyb5445f6wixfdspypjg"; sha256 = "0a3a2b15vpacnqgpp6fiy1pwyc8q6ywzvyb5445f6wixfdspypjg";
}; };
# TODO: should we really be putting outputs in $out/usr? I'd expect -P$out below
configurePhase = '' configurePhase = ''
export XALANCROOT=`pwd`/c export XALANCROOT=`pwd`/c
cd `pwd`/c cd `pwd`/c
mkdir -p $out/usr mkdir -p $out/usr
./runConfigure -p linux -c gcc -x g++ -P$out/usr ./runConfigure -p ${platform} -c cc -x c++ -P$out/usr
''; '';
buildInputs = [ xercesc ]; buildInputs = [ xercesc getopt ];
meta = { meta = {
homepage = http://xalan.apache.org/; homepage = http://xalan.apache.org/;
description = "A XSLT processor for transforming XML documents"; description = "A XSLT processor for transforming XML documents";
license = stdenv.lib.licenses.asl20; license = stdenv.lib.licenses.asl20;
platforms = stdenv.lib.platforms.linux; platforms = stdenv.lib.platforms.linux ++ stdenv.lib.platforms.darwin;
maintainers = [ stdenv.lib.maintainers.jagajaga ]; maintainers = [ stdenv.lib.maintainers.jagajaga ];
}; };
} }