2015-03-21 20:28:11 +00:00
|
|
|
{ stdenv, fetchurl, jdk }:
|
|
|
|
with stdenv.lib;
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "picoLisp-${version}";
|
2017-04-20 22:25:23 +00:00
|
|
|
version = "16.12";
|
2015-03-21 20:28:11 +00:00
|
|
|
src = fetchurl {
|
|
|
|
url = "http://www.software-lab.de/${name}.tgz";
|
2017-04-20 22:25:23 +00:00
|
|
|
sha256 = "1k3x6mvk9b34iiyml142bzh3gf241f25ywjlaagbxzb9vklpws75";
|
2011-03-28 08:16:15 +00:00
|
|
|
};
|
2015-10-01 09:20:24 +00:00
|
|
|
buildInputs = optional stdenv.is64bit jdk;
|
|
|
|
patchPhase = optionalString stdenv.isArm ''
|
2015-09-27 20:36:58 +00:00
|
|
|
sed -i s/-m32//g Makefile
|
|
|
|
cat >>Makefile <<EOF
|
|
|
|
ext.o: ext.c
|
|
|
|
\$(CC) \$(CFLAGS) -fPIC -D_OS='"\$(OS)"' \$*.c
|
|
|
|
ht.o: ht.c
|
|
|
|
\$(CC) \$(CFLAGS) -fPIC -D_OS='"\$(OS)"' \$*.c
|
|
|
|
EOF
|
2015-10-01 09:20:24 +00:00
|
|
|
'';
|
2015-03-21 20:28:11 +00:00
|
|
|
sourceRoot = ''picoLisp/src${optionalString stdenv.is64bit "64"}'';
|
|
|
|
installPhase = ''
|
2011-03-28 08:16:15 +00:00
|
|
|
cd ..
|
|
|
|
|
2012-01-18 20:16:00 +00:00
|
|
|
mkdir -p "$out/share/picolisp" "$out/lib" "$out/bin"
|
2011-03-28 08:16:15 +00:00
|
|
|
cp -r . "$out/share/picolisp/build-dir"
|
|
|
|
ln -s "$out/share/picolisp/build-dir" "$out/lib/picolisp"
|
|
|
|
ln -s "$out/lib/picolisp/bin/picolisp" "$out/bin/picolisp"
|
2015-03-21 20:28:11 +00:00
|
|
|
|
|
|
|
cat >"$out/bin/pil" <<EOF
|
|
|
|
#! /bin/sh
|
2015-10-02 23:51:46 +00:00
|
|
|
exec $out/bin/picolisp $out/lib/picolisp/lib.l @lib/misc.l @lib/btree.l @lib/db.l @lib/pilog.l
|
2015-03-21 20:28:11 +00:00
|
|
|
EOF
|
|
|
|
chmod +x "$out/bin/pil"
|
|
|
|
|
|
|
|
mkdir -p "$out/share/emacs"
|
|
|
|
ln -s "$out/lib/picolisp/lib/el" "$out/share/emacs/site-lisp"
|
|
|
|
'';
|
|
|
|
|
2011-03-28 08:16:15 +00:00
|
|
|
meta = {
|
2016-02-27 17:24:00 +00:00
|
|
|
description = "A simple Lisp with an integrated database";
|
2017-08-22 18:50:04 +00:00
|
|
|
homepage = https://picolisp.com/;
|
2015-03-21 20:28:11 +00:00
|
|
|
license = licenses.mit;
|
2016-08-02 14:41:28 +00:00
|
|
|
platforms = platforms.all;
|
2015-11-24 22:27:16 +00:00
|
|
|
maintainers = with maintainers; [ raskin tohl ];
|
2011-03-28 08:16:15 +00:00
|
|
|
};
|
2015-03-21 20:28:11 +00:00
|
|
|
|
2011-03-28 08:16:15 +00:00
|
|
|
passthru = {
|
|
|
|
updateInfo = {
|
|
|
|
downloadPage = "http://www.software-lab.de/down.html";
|
|
|
|
};
|
|
|
|
};
|
2015-03-21 20:28:11 +00:00
|
|
|
}
|