nixpkgs/pkgs/development
Joaquim Pedro França Simão 3e69bdcc94
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 11:30:57 -03:00
..
androidndk-pkgs Remove redundant chmod 2018-12-19 22:45:48 +01:00
arduino platformio: 3.6.1 -> 3.6.2 2018-12-11 16:37:07 +08:00
beam-modules
bower-modules/generic
compilers Merge pull request #52887 from r-ryantm/auto-update/gprolog 2018-12-26 11:07:32 +01:00
coq-modules coqPackages.Verdi: fix build 2018-12-21 12:37:04 +01:00
dhall-modules
dotnet-modules/patches
em-modules/generic
go-modules buildGoPackage: also support pname 2018-12-18 03:57:54 +01:00
guile-modules
haskell-modules haskellPackages.Frames: unbreak 2018-12-26 15:19:10 +01:00
idris-modules idrisPackages.tparsec: 2018-06-26 -> 2018-11-09 2018-12-20 15:52:20 +01:00
interpreters picoLisp 16.12 -> 18.12 2018-12-28 11:30:57 -03:00
java-modules
libraries fflas-ffpack: add patch to fix flaky test (#53005) 2018-12-28 14:02:43 +01:00
lisp-modules
lua-modules
misc
mobile Reintroduce licenseAccepted option 2018-12-18 21:16:07 +01:00
node-packages nodePackages: Regenerate and fix azure-cli 2018-12-10 11:46:46 +01:00
ocaml-modules ocamlPackages.ppx_deriving_yojson: 3.1 -> 3.3 2018-12-25 10:43:41 +01:00
perl-modules
pharo pharo: Simple fix for Iceberg (#52466) 2018-12-19 12:16:06 +01:00
pure-modules
python-modules Merge pull request #52876 from marsam/init-detect-secrets 2018-12-27 21:08:18 -05:00
r-modules R: update CRAN package set 2018-12-12 11:17:25 -06:00
ruby-modules Merge pull request #52569 from alyssais/qyliss-ruby 2018-12-20 18:42:31 +01:00
tools detect-secrets: init at 0.11.0 2018-12-27 05:23:32 -05:00
web Merge pull request #52299 from r-ryantm/auto-update/insomnia 2018-12-18 00:57:54 +01:00