mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-18 03:34:58 +00:00
57bccb3cb8
* treewide: http -> https sources This updates the source urls of all top-level packages from http to https where possible. * buildtorrent: fix url and tab -> spaces
55 lines
1.5 KiB
Nix
55 lines
1.5 KiB
Nix
{ stdenv, fetchurl, jdk }:
|
|
with stdenv.lib;
|
|
|
|
stdenv.mkDerivation rec {
|
|
name = "picoLisp-${version}";
|
|
version = "16.12";
|
|
src = fetchurl {
|
|
url = "https://www.software-lab.de/${name}.tgz";
|
|
sha256 = "1k3x6mvk9b34iiyml142bzh3gf241f25ywjlaagbxzb9vklpws75";
|
|
};
|
|
buildInputs = optional stdenv.is64bit jdk;
|
|
patchPhase = 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"
|
|
|
|
cat >"$out/bin/pil" <<EOF
|
|
#! /bin/sh
|
|
exec $out/bin/picolisp $out/lib/picolisp/lib.l @lib/misc.l @lib/btree.l @lib/db.l @lib/pilog.l
|
|
EOF
|
|
chmod +x "$out/bin/pil"
|
|
|
|
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";
|
|
};
|
|
};
|
|
}
|