summary refs log tree commit diff
path: root/pkgs/development/interpreters
diff options
context:
space:
mode:
authorPatrick Hilhorst <git@hilhorst.be>2018-10-03 18:42:29 +0200
committerPatrick Hilhorst <git@hilhorst.be>2018-10-03 19:59:23 +0200
commit91c6d352f93922f7f2064d5e02f842403bfe92de (patch)
treef60e83e6fa46d1270a5cdb3c17bb5a5c46d0c30a /pkgs/development/interpreters
parentfbc1fb78e37cc29eadee4ad8687e8777eba3cf0e (diff)
downloadnixlib-91c6d352f93922f7f2064d5e02f842403bfe92de.tar
nixlib-91c6d352f93922f7f2064d5e02f842403bfe92de.tar.gz
nixlib-91c6d352f93922f7f2064d5e02f842403bfe92de.tar.bz2
nixlib-91c6d352f93922f7f2064d5e02f842403bfe92de.tar.lz
nixlib-91c6d352f93922f7f2064d5e02f842403bfe92de.tar.xz
nixlib-91c6d352f93922f7f2064d5e02f842403bfe92de.tar.zst
nixlib-91c6d352f93922f7f2064d5e02f842403bfe92de.zip
j: 808 -> 807
"But Synthetica", I hear you say, "isn't that a downgrade?".

That's what I originally thought as well! So I emailed the  maintainer
for the only other repo that had J on version 808, BSD FreePorts. Since
they also didn't know what was going on here, I emailed Jsoftware
themselves. I got a lovely email back from Mr. Iverson (Jr. I presume?)
himself:

![The email](https://i.imgur.com/RidiODe.png)

So it has been confirmed from the horse's mouth that this _is_ the
correct version to be on.

I also re-enabled all the tests, since they all pass now, enabled the
build on ARM and Darwin (I don't have access to either kind of machine,
but I don't see why it wouldn't work), and added myself as a maintainer.
Diffstat (limited to 'pkgs/development/interpreters')
-rw-r--r--pkgs/development/interpreters/j/default.nix43
1 files changed, 25 insertions, 18 deletions
diff --git a/pkgs/development/interpreters/j/default.nix b/pkgs/development/interpreters/j/default.nix
index cb351446301d..11feb1170c2c 100644
--- a/pkgs/development/interpreters/j/default.nix
+++ b/pkgs/development/interpreters/j/default.nix
@@ -1,20 +1,20 @@
-{ stdenv, fetchFromGitHub, readline, libedit }:
+{ stdenv, fetchFromGitHub, readline, libedit, bc }:
 
 stdenv.mkDerivation rec {
   name = "j-${version}";
-  version = "808";
+  version = "807";
   jtype = "release";
   src = fetchFromGitHub {
     owner = "jsoftware";
     repo = "jsource";
     rev = "j${version}-${jtype}";
-    sha256 = "1sshm04p3yznlhfp6vyc7g8qxw95y67vhnh92cmz3lfy69n2q6bf";
+    sha256 = "1qciw2yg9x996zglvj2461qby038x89xcmfb3qyrh3myn8m1nq2n";
   };
 
-  buildInputs = [ readline libedit ];
+  buildInputs = [ readline libedit bc ];
   bits = if stdenv.is64bit then "64" else "32";
   platform =
-    /*if stdenv.isRaspberryPi then "raspberry" else*/
+    if (stdenv.isAarch32 || stdenv.isAarch64) then "raspberry" else
     if stdenv.isLinux then "linux" else
     if stdenv.isDarwin then "darwin" else
     "unknown";
@@ -24,18 +24,24 @@ stdenv.mkDerivation rec {
   buildPhase = ''
     export SOURCE_DIR=$(pwd)
     export HOME=$TMPDIR
-    export JBIN=$HOME/j${bits}/bin
     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
+
     cd make
 
     patchShebangs .
-    sed -i jvars.sh -e '
-      s@~/gitdev/jsource@$SOURCE_DIR@;
+    sed -i jvars.sh -e "
+      s@~/git/jsource@$SOURCE_DIR@;
       s@~/jbld@$HOME@;
-      s@linux@${platform}@;
-      '
+      "
 
     sed -i $JLIB/bin/profile.ijs -e "s@'/usr/share/j/.*'@'$out/share/j'@;"
 
@@ -48,7 +54,7 @@ stdenv.mkDerivation rec {
       #define jplatform  "${platform}"
       #define jtype      "${jtype}"         // release,beta,...
       #define jlicense   "GPL3"
-      #define jbuilder   "unknown"  // website or email
+      #define jbuilder   "nixpkgs"  // website or email
       ' > ../jsrc/jversion.h
 
     ./build_jconsole.sh j${bits}
@@ -60,16 +66,17 @@ stdenv.mkDerivation rec {
 
     # Now run the real tests
     cd $SOURCE_DIR/test
-    # for f in *.ijs
-    # do
-    #   echo $f
-    #   $JBIN/jconsole < $f
-    # done
+    for f in *.ijs
+    do
+      echo $f
+      $JBIN/jconsole < $f > /dev/null || echo FAIL && echo PASS
+    done
   '';
 
   installPhase = ''
     mkdir -p "$out"
     cp -r $JBIN "$out/bin"
+    rm $out/bin/*.txt # Remove logs from the bin folder
 
     mkdir -p "$out/share/j"
     cp -r $JLIB/{addons,system} "$out/share/j"
@@ -78,8 +85,8 @@ stdenv.mkDerivation rec {
 
   meta = with stdenv.lib; {
     description = "J programming language, an ASCII-based APL successor";
-    maintainers = with maintainers; [ raskin ];
-    platforms = platforms.linux;
+    maintainers = with maintainers; [ raskin synthetica ];
+    platforms = with platforms; linux ++ darwin;
     license = licenses.gpl3Plus;
     homepage = http://jsoftware.com/;
   };