nixpkgs-suyu/pkgs/development/interpreters/picolisp/default.nix

66 lines
1.9 KiB
Nix
Raw Normal View History

{ stdenv, fetchurl, jdk, w3m, openssl, makeWrapper }:
with stdenv.lib;
stdenv.mkDerivation rec {
pname = "picoLisp";
2020-01-07 07:25:42 +01:00
version = "19.12";
src = fetchurl {
url = "https://www.software-lab.de/${pname}-${version}.tgz";
2020-01-07 07:25:42 +01:00
sha256 = "10np0mhihr47r3201617zccrvzpkhdl1jwvz7zimk8kxpriydq2j";
};
buildInputs = [makeWrapper openssl] ++ optional stdenv.is64bit jdk;
picoLisp 16.12 -> 18.12 { stdenv, fetchurl, jdk, makeWrapper }: with stdenv.lib; stdenv.mkDerivation rec { name = "picoLisp-${version}"; version = "18.12"; src = fetchurl { url = "https://www.software-lab.de/${name}.tgz"; sha256 = "0hvgq2vc03bki528jqn95xmvv7mw8xx832spfczhxc16wwbrnrhk"; }; buildInputs = [makeWrapper] ++ optional stdenv.is64bit jdk; 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 ''} ''; sourceRoot = ''picoLisp/src${optionalString stdenv.is64bit "64"}''; installPhase = '' cd .. mkdir -p "$out/share/picolisp" "$out/lib" "$out/bin" 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" makeWrapper $out/bin/picolisp $out/bin/pil \ --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" mkdir -p "$out/share/emacs" ln -s "$out/lib/picolisp/lib/el" "$out/share/emacs/site-lisp" ''; meta = { description = "A simple Lisp with an integrated database"; homepage = https://picolisp.com/; license = licenses.mit; platforms = platforms.all; broken = stdenv.isDarwin; # times out maintainers = with maintainers; [ raskin tohl ]; }; passthru = { updateInfo = { downloadPage = "http://www.software-lab.de/down.html"; }; }; }
2018-12-28 15:30:57 +01: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 11:20:24 +02:00
'';
sourceRoot = ''picoLisp/src${optionalString stdenv.is64bit "64"}'';
postBuild = ''
cd ../src; make gate
'';
installPhase = ''
cd ..
mkdir -p "$out/share/picolisp" "$out/lib" "$out/bin"
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"
ln -s "$out/lib/picolisp/bin/httpGate" "$out/bin/httpGate"
picoLisp 16.12 -> 18.12 { stdenv, fetchurl, jdk, makeWrapper }: with stdenv.lib; stdenv.mkDerivation rec { name = "picoLisp-${version}"; version = "18.12"; src = fetchurl { url = "https://www.software-lab.de/${name}.tgz"; sha256 = "0hvgq2vc03bki528jqn95xmvv7mw8xx832spfczhxc16wwbrnrhk"; }; buildInputs = [makeWrapper] ++ optional stdenv.is64bit jdk; 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 ''} ''; sourceRoot = ''picoLisp/src${optionalString stdenv.is64bit "64"}''; installPhase = '' cd .. mkdir -p "$out/share/picolisp" "$out/lib" "$out/bin" 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" makeWrapper $out/bin/picolisp $out/bin/pil \ --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" mkdir -p "$out/share/emacs" ln -s "$out/lib/picolisp/lib/el" "$out/share/emacs/site-lisp" ''; meta = { description = "A simple Lisp with an integrated database"; homepage = https://picolisp.com/; license = licenses.mit; platforms = platforms.all; broken = stdenv.isDarwin; # times out maintainers = with maintainers; [ raskin tohl ]; }; passthru = { updateInfo = { downloadPage = "http://www.software-lab.de/down.html"; }; }; }
2018-12-28 15:30:57 +01:00
makeWrapper $out/bin/picolisp $out/bin/pil \
--prefix PATH : ${w3m}/bin \
picoLisp 16.12 -> 18.12 { stdenv, fetchurl, jdk, makeWrapper }: with stdenv.lib; stdenv.mkDerivation rec { name = "picoLisp-${version}"; version = "18.12"; src = fetchurl { url = "https://www.software-lab.de/${name}.tgz"; sha256 = "0hvgq2vc03bki528jqn95xmvv7mw8xx832spfczhxc16wwbrnrhk"; }; buildInputs = [makeWrapper] ++ optional stdenv.is64bit jdk; 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 ''} ''; sourceRoot = ''picoLisp/src${optionalString stdenv.is64bit "64"}''; installPhase = '' cd .. mkdir -p "$out/share/picolisp" "$out/lib" "$out/bin" 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" makeWrapper $out/bin/picolisp $out/bin/pil \ --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" mkdir -p "$out/share/emacs" ln -s "$out/lib/picolisp/lib/el" "$out/share/emacs/site-lisp" ''; meta = { description = "A simple Lisp with an integrated database"; homepage = https://picolisp.com/; license = licenses.mit; platforms = platforms.all; broken = stdenv.isDarwin; # times out maintainers = with maintainers; [ raskin tohl ]; }; passthru = { updateInfo = { downloadPage = "http://www.software-lab.de/down.html"; }; }; }
2018-12-28 15:30:57 +01: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"
mkdir -p "$out/share/emacs"
ln -s "$out/lib/picolisp/lib/el" "$out/share/emacs/site-lisp"
'';
meta = {
description = "A simple Lisp with an integrated database";
homepage = https://picolisp.com/;
license = licenses.mit;
platforms = platforms.all;
2018-06-23 23:31:44 +02:00
broken = stdenv.isDarwin; # times out
2015-11-24 23:27:16 +01:00
maintainers = with maintainers; [ raskin tohl ];
};
passthru = {
updateInfo = {
downloadPage = "http://www.software-lab.de/down.html";
};
};
}