2019-06-17 20:00:57 +01:00
|
|
|
{ stdenv, fetchurl, jdk, w3m, openssl, makeWrapper }:
|
2015-03-21 20:28:11 +00:00
|
|
|
with stdenv.lib;
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "picoLisp";
|
2020-01-07 06:25:42 +00:00
|
|
|
version = "19.12";
|
2015-03-21 20:28:11 +00:00
|
|
|
src = fetchurl {
|
2019-08-15 13:41:18 +01:00
|
|
|
url = "https://www.software-lab.de/${pname}-${version}.tgz";
|
2020-01-07 06:25:42 +00:00
|
|
|
sha256 = "10np0mhihr47r3201617zccrvzpkhdl1jwvz7zimk8kxpriydq2j";
|
2011-03-28 09:16:15 +01:00
|
|
|
};
|
2019-06-17 20:00:57 +01:00
|
|
|
buildInputs = [makeWrapper openssl] ++ optional stdenv.is64bit jdk;
|
2018-12-28 14:30:57 +00:00
|
|
|
patchPhase = ''
|
|
|
|
sed -i "s/which java/command -v java/g" mkAsm
|
|
|
|
|
|
|
|
${optionalString stdenv.isAarch32 ''
|
|
|
|
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 10:20:24 +01:00
|
|
|
'';
|
2015-03-21 20:28:11 +00:00
|
|
|
sourceRoot = ''picoLisp/src${optionalString stdenv.is64bit "64"}'';
|
2019-06-17 20:00:57 +01:00
|
|
|
postBuild = ''
|
|
|
|
cd ../src; make gate
|
|
|
|
'';
|
2015-03-21 20:28:11 +00:00
|
|
|
installPhase = ''
|
2011-03-28 09:16:15 +01:00
|
|
|
cd ..
|
|
|
|
|
2012-01-18 20:16:00 +00:00
|
|
|
mkdir -p "$out/share/picolisp" "$out/lib" "$out/bin"
|
2011-03-28 09:16:15 +01: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"
|
2019-06-17 20:00:57 +01:00
|
|
|
ln -s "$out/lib/picolisp/bin/httpGate" "$out/bin/httpGate"
|
2015-03-21 20:28:11 +00:00
|
|
|
|
2018-12-28 14:30:57 +00:00
|
|
|
|
|
|
|
makeWrapper $out/bin/picolisp $out/bin/pil \
|
2019-06-14 22:41:39 +01:00
|
|
|
--prefix PATH : ${w3m}/bin \
|
2018-12-28 14:30:57 +00:00
|
|
|
--add-flags "$out/lib/picolisp/lib.l" \
|
|
|
|
--add-flags "@lib/misc.l" \
|
|
|
|
--add-flags "@lib/btree.l" \
|
|
|
|
--add-flags "@lib/db.l" \
|
|
|
|
--add-flags "@lib/pilog.l"
|
2015-03-21 20:28:11 +00:00
|
|
|
|
|
|
|
mkdir -p "$out/share/emacs"
|
|
|
|
ln -s "$out/lib/picolisp/lib/el" "$out/share/emacs/site-lisp"
|
|
|
|
'';
|
|
|
|
|
2011-03-28 09:16:15 +01:00
|
|
|
meta = {
|
2016-02-27 17:24:00 +00:00
|
|
|
description = "A simple Lisp with an integrated database";
|
2017-08-22 19:50:04 +01:00
|
|
|
homepage = https://picolisp.com/;
|
2015-03-21 20:28:11 +00:00
|
|
|
license = licenses.mit;
|
2016-08-02 15:41:28 +01:00
|
|
|
platforms = platforms.all;
|
2018-06-23 22:31:44 +01:00
|
|
|
broken = stdenv.isDarwin; # times out
|
2015-11-24 22:27:16 +00:00
|
|
|
maintainers = with maintainers; [ raskin tohl ];
|
2011-03-28 09:16:15 +01:00
|
|
|
};
|
2015-03-21 20:28:11 +00:00
|
|
|
|
2011-03-28 09:16:15 +01:00
|
|
|
passthru = {
|
|
|
|
updateInfo = {
|
|
|
|
downloadPage = "http://www.software-lab.de/down.html";
|
|
|
|
};
|
|
|
|
};
|
2015-03-21 20:28:11 +00:00
|
|
|
}
|