From 333a5bf42bca79c8b3d406c1c3159c3a9c484d6b Mon Sep 17 00:00:00 2001 From: Aristid Breitkreuz Date: Sat, 18 Jun 2016 14:29:09 +0200 Subject: [PATCH 1/3] J: fix build --- pkgs/development/interpreters/j/default.nix | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/pkgs/development/interpreters/j/default.nix b/pkgs/development/interpreters/j/default.nix index 4c064a42ebf8..7238197fd858 100644 --- a/pkgs/development/interpreters/j/default.nix +++ b/pkgs/development/interpreters/j/default.nix @@ -11,6 +11,8 @@ stdenv.mkDerivation rec { bits = if stdenv.is64bit then "64" else "32"; buildPhase = '' + set -e + sed -i bin/jconfig -e ' s@bits=32@bits=${bits}@g; s@readline=0@readline=1@; @@ -19,20 +21,27 @@ stdenv.mkDerivation rec { ' sed -i bin/build_libj -e 's@>& make.txt@ 2>\&1 | tee make.txt@' + sed -i f2.c -e 's/_isnan(\*wv)/_isnan(y)/' + touch *.c *.h sh -o errexit bin/build_jconsole + [ -e j/bin/jconsole ] sh -o errexit bin/build_libj + [ -e j/bin/libj.so ] sh -o errexit bin/build_defs + [ -e defs/hostdefs.ijs ] && [ -e defs/netdefs.ijs ] sh -o errexit bin/build_tsdll + [ -x libtsdll.so ] sed -i j/bin/profile.ijs -e " s@userx=[.] *'.j'@userx=. '/.j'@; s@bin,'/profilex.ijs'@user,'/profilex.ijs'@ ; - /install=./ainstall=. install,'/share/j' + /install=./ainstall=. install,'/share/j' " ''; installPhase = '' + ls -R mkdir -p "$out" cp -r j/bin "$out/bin" rm "$out/bin/profilex_template.ijs" From fd2d209fff843554ce4387832380120486cf7f72 Mon Sep 17 00:00:00 2001 From: Aristid Breitkreuz Date: Sat, 18 Jun 2016 14:40:09 +0200 Subject: [PATCH 2/3] J: mark as Linux-only until it has been tested on non-Linux --- pkgs/development/interpreters/j/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/interpreters/j/default.nix b/pkgs/development/interpreters/j/default.nix index 7238197fd858..45355d41e0d2 100644 --- a/pkgs/development/interpreters/j/default.nix +++ b/pkgs/development/interpreters/j/default.nix @@ -54,7 +54,7 @@ stdenv.mkDerivation rec { meta = with stdenv.lib; { description = "J programming language, an ASCII-based APL successor"; maintainers = with maintainers; [ raskin ]; - platforms = platforms.unix; + platforms = platforms.linux; license = licenses.gpl3Plus; homepage = http://jsoftware.com/; }; From 92de74293c3b1a3eba50e1fad00337012492509f Mon Sep 17 00:00:00 2001 From: Aristid Breitkreuz Date: Sat, 18 Jun 2016 15:18:06 +0200 Subject: [PATCH 3/3] J: add simple check phase, remove debug parts of build script --- pkgs/development/interpreters/j/default.nix | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/pkgs/development/interpreters/j/default.nix b/pkgs/development/interpreters/j/default.nix index 45355d41e0d2..94641e20e1bc 100644 --- a/pkgs/development/interpreters/j/default.nix +++ b/pkgs/development/interpreters/j/default.nix @@ -10,9 +10,9 @@ stdenv.mkDerivation rec { buildInputs = [ readline ]; bits = if stdenv.is64bit then "64" else "32"; - buildPhase = '' - set -e + doCheck = true; + buildPhase = '' sed -i bin/jconfig -e ' s@bits=32@bits=${bits}@g; s@readline=0@readline=1@; @@ -40,8 +40,11 @@ stdenv.mkDerivation rec { " ''; + checkPhase = '' + echo 'i. 5' | j/bin/jconsole | fgrep "0 1 2 3 4" + ''; + installPhase = '' - ls -R mkdir -p "$out" cp -r j/bin "$out/bin" rm "$out/bin/profilex_template.ijs"