@ -28,8 +28,8 @@ rec {
libjson-c . a \
- o ./test1.js
echo " U s i n g n o d e t o e x e c u t e t h e t e s t w h i c h b a s i c a l l y o u t p u t s a n e r r o r o n s t d e r r w h i c h w e g r e p f o r "
$ { pkgs . nodejs } /bin/node ./test1.js
echo " U s i n g n o d e t o e x e c u t e t h e t e s t w h i c h b a s i c a l l y o u t p u t s a n e r r o r o n s t d e r r w h i c h w e g r e p f o r "
$ { pkgs . nodejs } /bin/node ./test1.js
set + x
if [ $ ? - ne 0 ] ; then
@ -41,17 +41,17 @@ rec {
echo " = = = = = = = = = = = = = = = = = / t e s t i n g j s o n _ c u s i n g n o d e = = = = = = = = = = = = = = = = = "
'' ;
} ) ;
libxml2 = ( pkgs . libxml2 . override {
stdenv = emscriptenStdenv ;
pythonSupport = false ;
} ) . overrideDerivation
( old : {
( old : {
propagatedBuildInputs = [ zlib ] ;
buildInputs = old . buildInputs ++ [ pkg-config ] ;
# just override it with nothing so it does not fail
autoreconfPhase = " e c h o a u t o r e c o n f P h a s e n o t u s e d . . . " ;
autoreconfPhase = " e c h o a u t o r e c o n f P h a s e n o t u s e d . . . " ;
configurePhase = ''
HOME = $ TMPDIR
emconfigure ./configure - - prefix = $ out - - without-python
@ -63,10 +63,10 @@ rec {
set - x
emcc - O2 - s EMULATE_FUNCTION_POINTER_CASTS = 1 xmllint . o \
./.libs/libxml2.a ` pkg-config zlib - - cflags ` ` pkg-config zlib - - libs ` - o ./xmllint.test.js \
- - embed-file ./test/xmlid/id_err1.xml
- - embed-file ./test/xmlid/id_err1.xml
echo " U s i n g n o d e t o e x e c u t e t h e t e s t w h i c h b a s i c a l l y o u t p u t s a n e r r o r o n s t d e r r w h i c h w e g r e p f o r "
$ { pkgs . nodejs } /bin/node ./xmllint.test.js - - noout test/xmlid/id_err1.xml 2 > & 1 | grep 0 bar
echo " U s i n g n o d e t o e x e c u t e t h e t e s t w h i c h b a s i c a l l y o u t p u t s a n e r r o r o n s t d e r r w h i c h w e g r e p f o r "
$ { pkgs . nodejs } /bin/node ./xmllint.test.js - - noout test/xmlid/id_err1.xml 2 > & 1 | grep 0 bar
set + x
if [ $ ? - ne 0 ] ; then
@ -77,8 +77,8 @@ rec {
fi
echo " = = = = = = = = = = = = = = = = = / t e s t i n g l i b x m l 2 u s i n g n o d e = = = = = = = = = = = = = = = = = "
'' ;
} ) ;
} ) ;
xmlmirror = pkgs . buildEmscriptenPackage rec {
pname = " x m l m i r r o r " ;
version = " u n s t a b l e - 2 0 1 6 - 0 6 - 0 5 " ;
@ -91,7 +91,7 @@ rec {
rev = " 4 f d 7 e 8 6 f 7 c 9 5 2 6 b 8 f 4 c 1 7 3 3 e 5 c 8 b 4 5 1 7 5 8 6 0 a 8 f d " ;
sha256 = " 1 j a s d q n b d n b 8 3 w b c n y r p 3 2 f 3 6 w 3 x w h w p 0 w q 8 l w w m h q a g x r i j 1 r 4 b " ;
} ;
configurePhase = ''
rm - f fastXmlLint . js *
# a fix for ERROR:root:For asm.js, TOTAL_MEMORY must be a multiple of 16MB, was 234217728
@ -103,18 +103,18 @@ rec {
# https://gitlab.com/odfplugfest/xmlmirror/issues/11
sed - e " s / - o f a s t X m l L i n t . j s / - s E X T R A _ E X P O R T E D _ R U N T I M E _ M E T H O D S = ' [ \" c c a l l \" , \" c w r a p \" ] ' - o f a s t X m l L i n t . j s / g " - i Makefile . emEnv
'' ;
buildPhase = ''
HOME = $ TMPDIR
make - f Makefile . emEnv
'' ;
outputs = [ " o u t " " d o c " ] ;
installPhase = ''
mkdir - p $ out/share
mkdir - p $ doc/share / $ { pname }
cp Demo * $ out/share
cp - R codemirror-5 .12 $ out/share
cp fastXmlLint . js * $ out/share
@ -127,14 +127,13 @@ rec {
cp README . md $ doc/share / $ { pname }
'' ;
checkPhase = ''
'' ;
} ;
} ;
zlib = ( pkgs . zlib . override {
stdenv = pkgs . emscriptenStdenv ;
} ) . overrideDerivation
( old : {
( old : {
buildInputs = old . buildInputs ++ [ pkg-config ] ;
# we need to reset this setting!
NIX_CFLAGS_COMPILE = " " ;
@ -165,7 +164,7 @@ rec {
- L . libz . so . ${ old . version } - I . - o example . js
echo " U s i n g n o d e t o e x e c u t e t h e t e s t "
$ { pkgs . nodejs } /bin/node ./example.js
$ { pkgs . nodejs } /bin/node ./example.js
set + x
if [ $ ? - ne 0 ] ; then
@ -183,6 +182,6 @@ rec {
- - replace ' AR = " l i b t o o l " ' ' AR = " a r " ' \
- - replace ' ARFLAGS = " - o " ' ' ARFLAGS = " - r " '
'' ;
} ) ;
} ) ;
}