Commit b4efebae authored by Kasper Gałkowski's avatar Kasper Gałkowski
Browse files

lisp-modules: remove pkgs/development/lisp-modules-obsolete

parent 4acef81a
Loading
Loading
Loading
Loading
+0 −30
Original line number Diff line number Diff line
Want to add a package?  There are 3 simple steps!
1. Add the needed system names to quicklisp-to-nix-systems.txt.
2. cd <path to quicklisp-to-nix-systems.txt> ; nix-shell --pure --run 'quicklisp-to-nix .'
  You might want to specify also the --cacheSystemInfoDir and --cacheFaslDir
  parameters to preserve some data between runs. For example, it is very
  useful when you add new packages with native dependencies and fail to
  specify the native dependencies correctly the first time.
  (Might be nice to ensure the cache directories exist)
3. Add native libraries and whatever else is needed to quicklisp-to-nix-overrides.nix.
   If libraries are needed during package analysis then add them to shell.nix, too.
4. Sometimes there are problems with loading implementation-provided systems.
  In this case you might need to add more systems in the implementation's (so
  SBCL's) entry into *implementation-systems* in quicklisp-to-nix/system-info.lisp

To update to a more recent quicklisp dist modify
lispPackages.quicklisp to have a more recent distinfo.

quicklisp-to-nix-system-info is responsible for installing a quicklisp
package into an isolated environment and figuring out which packages
are required by that system.  It also extracts other information that
is readily available once the system is loaded.  The information
produced by this program is fed into quicklisp-to-nix.  You usually
don't need to run this program unless you're trying to understand why
quicklisp-to-nix failed to handle a system.  The technique used by
quicklisp-to-nix-system-info is described in its source.

quicklisp-to-nix is responsible for reading
quicklisp-to-nix-systems.txt, running quicklisp-to-nix-system-info,
and generating the nix packages associated with the closure of
quicklisp systems.
+0 −38
Original line number Diff line number Diff line
{ lib, stdenv, fetchurl, texinfo, texLive, perl }:

stdenv.mkDerivation rec {
  pname = "asdf";
  version = "2.26";

  src = fetchurl {
    url = "http://common-lisp.net/project/asdf/archives/asdf-${version}.tar.gz";
    sha256 = "sha256-tuUuIlZcS+a0izXeJl3Ckp+/PYAWkZ0+Cw7blwkh9+M=";
  };

  strictDeps = true;
  nativeBuildInputs = [
    texinfo
    texLive
    perl
  ];

  buildPhase = ''
    make asdf.lisp
    mkdir build
    ln -s ../asdf.lisp build
  '';
  installPhase = ''
    mkdir -p "$out"/lib/common-lisp/asdf/
    mkdir -p "$out"/share/doc/asdf/
    cp -r ./* "$out"/lib/common-lisp/asdf/
    cp -r doc/* "$out"/share/doc/asdf/
    ln -s  "$out"/lib/common-lisp/{asdf/uiop,uiop}
  '';

  meta = with lib; {
    description = "Standard software-system definition library for Common Lisp";
    license = licenses.mit;
    maintainers = with maintainers; [ raskin ];
    platforms = platforms.linux;
  };
}
+0 −37
Original line number Diff line number Diff line
{ lib, stdenv, fetchurl, texinfo, texLive, perl }:

stdenv.mkDerivation rec {
  pname = "asdf";
  version = "3.1.7";

  src = fetchurl {
    url = "http://common-lisp.net/project/asdf/archives/asdf-${version}.tar.gz";
    sha256 = "sha256-+P+FLM1mr2KRdj7bfhWq4ync86bJS/uE0Jm/E/e4HL0=";
  };

  strictDeps = true;
  nativeBuildInputs = [
    texinfo
    texLive
    perl
  ];

  buildPhase = ''
    make build/asdf.lisp
    make -C doc asdf.info asdf.html
  '';
  installPhase = ''
    mkdir -p "$out"/lib/common-lisp/asdf/
    mkdir -p "$out"/share/doc/asdf/
    cp -r ./* "$out"/lib/common-lisp/asdf/
    cp -r doc/* "$out"/share/doc/asdf/
    ln -s  "$out"/lib/common-lisp/{asdf/uiop,uiop}
  '';

  meta = with lib; {
    description = "Standard software-system definition library for Common Lisp";
    license = licenses.mit;
    maintainers = with maintainers; [ raskin ];
    platforms = platforms.unix;
  };
}
+0 −37
Original line number Diff line number Diff line
{ lib, stdenv, fetchurl, texinfo, texLive, perl }:

stdenv.mkDerivation rec {
  pname = "asdf";
  version = "3.3.4";

  src = fetchurl {
    url = "http://common-lisp.net/project/asdf/archives/asdf-${version}.tar.gz";
    sha256 = "sha256-/k7cmN0ymZUgpP4K+IWfhq85TkzfPjTR4QdUgV9n1x4=";
  };

  strictDeps = true;
  nativeBuildInputs = [
    texinfo
    texLive
    perl
  ];

  buildPhase = ''
    make build/asdf.lisp
    make -C doc asdf.info asdf.html
  '';
  installPhase = ''
    mkdir -p "$out"/lib/common-lisp/asdf/
    mkdir -p "$out"/share/doc/asdf/
    cp -r ./* "$out"/lib/common-lisp/asdf/
    cp -r doc/* "$out"/share/doc/asdf/
    ln -s  "$out"/lib/common-lisp/{asdf/uiop,uiop}
  '';

  meta = with lib; {
    description = "Standard software-system definition library for Common Lisp";
    license = licenses.mit;
    maintainers = with maintainers; [ raskin ];
    platforms = platforms.unix;
  };
}
+0 −67
Original line number Diff line number Diff line
#! /bin/sh
# Part of NixPkgs package collection
# This script can be used at your option under the same license as NixPkgs or
# under MIT/X11 license

lisp="$1"
systems="$2"
target="$3"
code="$4"

NIX_LISP_SKIP_CODE=1 NIX_LISP_COMMAND="$lisp" source "$(dirname "$0")/cl-wrapper.sh"

NIX_LISP_BUILD_CODE=

case "$NIX_LISP" in
        sbcl)
                NIX_LISP_BUILD_CODE="(progn
                  (let*
                    ((old-fn (symbol-function 'sb-alien::dlopen-or-lose )))
                    (sb-ext:with-unlocked-packages (:sb-sys :sb-alien)
                      (defun sb-alien::dlopen-or-lose (&rest args)
                        (or
                          (ignore-errors (progn (apply old-fn args)))
                          (and
                            args
                            (loop
                              with try = nil
                              with obj = (first args)
                              with original-namestring = (sb-alien::shared-object-namestring obj)
                              for path in (list $(echo "$NIX_LISP_LD_LIBRARY_PATH" | sed -e 's/:/" "/g; s/^/"/; s/$/"/'))
                              for target := (format nil \"~a/~a\" path original-namestring)
                              when (ignore-errors
                                     (progn
                                       (setf (sb-alien::shared-object-namestring obj) target)
                                       (setf try (apply old-fn args))
                                           t)) do
                                (progn  (return try))
                                finally (progn (setf (sb-alien::shared-object-namestring obj) original-namestring)
                                  (return (apply old-fn args)))
                              )
                             )
                          )
                        )
                      )
                    )
                  (sb-ext:save-lisp-and-die \"$target\"
                  :toplevel (lambda ()
                    (setf common-lisp:*standard-input* (sb-sys::make-fd-stream 0 :input t :buffering :line))
                    (setf common-lisp:*standard-output* (sb-sys::make-fd-stream 1 :output t :buffering :line))
                    (setf uiop/image:*command-line-arguments* (cdr sb-ext:*posix-argv*))
                    $code)
                    :executable t :save-runtime-options t :purify t))"
                systems=":sb-posix $systems"
                ;;
        ecl)
                NIX_LISP_BUILD_CODE="()"
                ;;
        clisp)
                NIX_LISP_BUILD_CODE="(ext:saveinitmem \"$target\" :norc t :init-function (lambda () $code (ext:bye)) :script nil :executable 0)"
                ;;
esac

"$lisp" \
  "$NIX_LISP_EXEC_CODE" "(load \"$NIX_LISP_ASDF/lib/common-lisp/asdf/build/asdf.lisp\")" \
  "$NIX_LISP_EXEC_CODE" "(mapcar 'asdf:load-system (list $systems))" \
  "$NIX_LISP_EXEC_CODE" "$NIX_LISP_BUILD_CODE" \
  "$NIX_LISP_EXEC_CODE" "(quit)"
Loading