summary refs log tree commit diff
path: root/pkgs/development/interpreters/pixie
diff options
context:
space:
mode:
authorHerwig Hochleitner <herwig@bendlas.net>2018-01-31 00:44:32 +0100
committerHerwig Hochleitner <herwig@bendlas.net>2018-02-01 00:36:46 +0100
commit1965804664a4742c71f0e8a9a2ef6019c26a80ea (patch)
tree20d73e1032df8998bb09596e9ced7f67d874dba1 /pkgs/development/interpreters/pixie
parent82b6c6939bb674da1ad3cbe09009bd34078104db (diff)
downloadnixpkgs-1965804664a4742c71f0e8a9a2ef6019c26a80ea.tar
nixpkgs-1965804664a4742c71f0e8a9a2ef6019c26a80ea.tar.gz
nixpkgs-1965804664a4742c71f0e8a9a2ef6019c26a80ea.tar.bz2
nixpkgs-1965804664a4742c71f0e8a9a2ef6019c26a80ea.tar.lz
nixpkgs-1965804664a4742c71f0e8a9a2ef6019c26a80ea.tar.xz
nixpkgs-1965804664a4742c71f0e8a9a2ef6019c26a80ea.tar.zst
nixpkgs-1965804664a4742c71f0e8a9a2ef6019c26a80ea.zip
pixie: implement checkPhase
Diffstat (limited to 'pkgs/development/interpreters/pixie')
-rw-r--r--pkgs/development/interpreters/pixie/default.nix23
1 files changed, 18 insertions, 5 deletions
diff --git a/pkgs/development/interpreters/pixie/default.nix b/pkgs/development/interpreters/pixie/default.nix
index ce8331a0936..f2e987323c0 100644
--- a/pkgs/development/interpreters/pixie/default.nix
+++ b/pkgs/development/interpreters/pixie/default.nix
@@ -56,18 +56,31 @@ let
       RPYTHON="`pwd`/pypy-src/rpython/bin/rpython";
       cd pixie-src
       $PYTHON $RPYTHON ${common-flags} ${target}
-      export LD_LIBRARY_PATH="${library-path}:$LD_LIBRARY_PATH"
       find pixie -name "*.pxi" -exec ./pixie-vm -c {} \;
     )'';
+    LD_LIBRARY_PATH = library-path;
+    C_INCLUDE_PATH = include-path;
+    LIBRARY_PATH = library-path;
+    PATH = bin-path;
     installPhase = ''
       mkdir -p $out/share $out/bin
       cp pixie-src/pixie-vm $out/share/pixie-vm
       cp -R pixie-src/pixie $out/share/pixie
       makeWrapper $out/share/pixie-vm $out/bin/pixie \
-        --prefix LD_LIBRARY_PATH : ${library-path} \
-        --prefix C_INCLUDE_PATH : ${include-path} \
-        --prefix LIBRARY_PATH : ${library-path} \
-        --prefix PATH : ${bin-path}
+        --prefix LD_LIBRARY_PATH : ${LD_LIBRARY_PATH} \
+        --prefix C_INCLUDE_PATH : ${C_INCLUDE_PATH} \
+        --prefix LIBRARY_PATH : ${LIBRARY_PATH} \
+        --prefix PATH : ${PATH}
+    '';
+    doCheck = true;
+    checkPhase = ''
+      RES=$(./pixie-src/pixie-vm -e "(print :ok)")
+      if [ "$RES" != ":ok" ]; then
+        echo "ERROR Unexpected output: '$RES'"
+        return 1
+      else
+        echo "$RES"
+      fi
     '';
     meta = {
       description = "A clojure-like lisp, built with the pypy vm toolkit";