mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-01 15:11:25 +00:00
Merge pull request #53010 from osmano807/patch-1
picoLisp 16.12 -> 18.12
This commit is contained in:
commit
61e4654814
@ -1,22 +1,26 @@
|
||||
{ stdenv, fetchurl, jdk }:
|
||||
{ stdenv, fetchurl, jdk, makeWrapper }:
|
||||
with stdenv.lib;
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "picoLisp-${version}";
|
||||
version = "16.12";
|
||||
version = "18.12";
|
||||
src = fetchurl {
|
||||
url = "https://www.software-lab.de/${name}.tgz";
|
||||
sha256 = "1k3x6mvk9b34iiyml142bzh3gf241f25ywjlaagbxzb9vklpws75";
|
||||
sha256 = "0hvgq2vc03bki528jqn95xmvv7mw8xx832spfczhxc16wwbrnrhk";
|
||||
};
|
||||
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
|
||||
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 = ''
|
||||
@ -27,11 +31,13 @@ stdenv.mkDerivation rec {
|
||||
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"
|
||||
|
||||
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"
|
||||
|
Loading…
Reference in New Issue
Block a user