j: 807 -> 901
Upgrade j to 901. Uses the newer build scripts in the make2 directory in the jsource repo.
This commit is contained in:
parent
6b9c0adc24
commit
0c454c46f4
@ -2,13 +2,14 @@
|
|||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "j";
|
pname = "j";
|
||||||
version = "807";
|
version = "901";
|
||||||
jtype = "release";
|
jtype = "release-e";
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "jsoftware";
|
owner = "jsoftware";
|
||||||
repo = "jsource";
|
repo = "jsource";
|
||||||
rev = "j${version}-${jtype}";
|
rev = "j${version}-${jtype}";
|
||||||
sha256 = "1qciw2yg9x996zglvj2461qby038x89xcmfb3qyrh3myn8m1nq2n";
|
sha256 = "13ky37rrl6mc66fckrdnrw64gmvq1qlv6skzd513lab4d0wigshw";
|
||||||
|
name = "jsource";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [ readline libedit bc ];
|
buildInputs = [ readline libedit bc ];
|
||||||
@ -26,57 +27,33 @@ stdenv.mkDerivation rec {
|
|||||||
export HOME=$TMPDIR
|
export HOME=$TMPDIR
|
||||||
export JLIB=$SOURCE_DIR/jlibrary
|
export JLIB=$SOURCE_DIR/jlibrary
|
||||||
|
|
||||||
export jbld=$HOME/bld
|
|
||||||
export jplatform=${platform}
|
|
||||||
export jmake=$SOURCE_DIR/make
|
|
||||||
export jgit=$SOURCE_DIR
|
|
||||||
export JBIN=$jbld/j${bits}/bin
|
|
||||||
mkdir -p $JBIN
|
|
||||||
|
|
||||||
echo $OUT_DIR
|
echo $OUT_DIR
|
||||||
|
|
||||||
cd make
|
cd make2
|
||||||
|
|
||||||
patchShebangs .
|
patchShebangs .
|
||||||
sed -i jvars.sh -e "
|
|
||||||
s@~/git/jsource@$SOURCE_DIR@;
|
|
||||||
s@~/jbld@$HOME@;
|
|
||||||
"
|
|
||||||
|
|
||||||
sed -i $JLIB/bin/profile.ijs -e "s@'/usr/share/j/.*'@'$out/share/j'@;"
|
sed -i $JLIB/bin/profile.ijs -e "s@'/usr/share/j/.*'@'$out/share/j'@;"
|
||||||
|
|
||||||
# For future versions, watch
|
./build_all.sh
|
||||||
# https://github.com/jsoftware/jsource/pull/4
|
|
||||||
cp ./jvars.sh $HOME
|
|
||||||
|
|
||||||
echo '
|
cp $SOURCE_DIR/bin/${platform}/j${bits}*/* "$JLIB/bin"
|
||||||
#define jversion "${version}"
|
|
||||||
#define jplatform "${platform}"
|
|
||||||
#define jtype "${jtype}" // release,beta,...
|
|
||||||
#define jlicense "GPL3"
|
|
||||||
#define jbuilder "nixpkgs" // website or email
|
|
||||||
' > ../jsrc/jversion.h
|
|
||||||
|
|
||||||
./build_jconsole.sh j${bits}
|
|
||||||
./build_libj.sh j${bits}
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
checkPhase = ''
|
checkPhase = ''
|
||||||
echo 'i. 5' | $JBIN/jconsole | fgrep "0 1 2 3 4"
|
|
||||||
|
echo 'i. 5' | $JLIB/bin/jconsole | fgrep "0 1 2 3 4"
|
||||||
|
|
||||||
# Now run the real tests
|
# Now run the real tests
|
||||||
cd $SOURCE_DIR/test
|
cd $SOURCE_DIR/test
|
||||||
for f in *.ijs
|
for f in *.ijs
|
||||||
do
|
do
|
||||||
echo $f
|
echo $f
|
||||||
$JBIN/jconsole < $f > /dev/null || echo FAIL && echo PASS
|
$JLIB/bin/jconsole < $f > /dev/null || echo FAIL && echo PASS
|
||||||
done
|
done
|
||||||
'';
|
'';
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
mkdir -p "$out"
|
mkdir -p "$out"
|
||||||
cp -r $JBIN "$out/bin"
|
|
||||||
rm $out/bin/*.txt # Remove logs from the bin folder
|
|
||||||
|
|
||||||
mkdir -p "$out/share/j"
|
mkdir -p "$out/share/j"
|
||||||
cp -r $JLIB/{addons,system} "$out/share/j"
|
cp -r $JLIB/{addons,system} "$out/share/j"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user