2021-01-22 11:25:31 +00:00
|
|
|
{ lib, stdenv
|
2019-08-11 17:17:41 +01:00
|
|
|
, fetchurl
|
|
|
|
, cmake
|
2021-01-19 06:50:56 +00:00
|
|
|
, pkg-config
|
2019-08-11 17:17:41 +01:00
|
|
|
, libffi
|
|
|
|
, boehmgc
|
|
|
|
, openssl
|
|
|
|
, zlib
|
|
|
|
, odbcSupport ? true
|
|
|
|
, libiodbc
|
|
|
|
}:
|
|
|
|
|
|
|
|
let platformLdLibraryPath = if stdenv.isDarwin then "DYLD_FALLBACK_LIBRARY_PATH"
|
|
|
|
else if (stdenv.isLinux or stdenv.isBSD) then "LD_LIBRARY_PATH"
|
|
|
|
else throw "unsupported platform";
|
|
|
|
in
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "sagittarius-scheme";
|
2020-08-29 15:36:16 +01:00
|
|
|
version = "0.9.7";
|
2019-08-11 17:17:41 +01:00
|
|
|
src = fetchurl {
|
|
|
|
url = "https://bitbucket.org/ktakashi/${pname}/downloads/sagittarius-${version}.tar.gz";
|
2020-08-29 15:36:16 +01:00
|
|
|
sha256 = "18pjj6f5qvixv5hbl1k4d3jqfcmi9qyx0gz0cjwrzpxa8brpwld8";
|
2019-08-11 17:17:41 +01:00
|
|
|
};
|
|
|
|
preBuild = ''
|
|
|
|
# since we lack rpath during build, need to explicitly add build path
|
|
|
|
# to LD_LIBRARY_PATH so we can load libsagittarius.so as required to
|
|
|
|
# build extensions
|
|
|
|
export ${platformLdLibraryPath}="$(pwd)/build"
|
|
|
|
'';
|
2021-01-19 06:50:56 +00:00
|
|
|
nativeBuildInputs = [ pkg-config cmake ];
|
2019-08-11 17:17:41 +01:00
|
|
|
|
2021-01-22 11:25:31 +00:00
|
|
|
buildInputs = [ libffi boehmgc openssl zlib ] ++ lib.optional odbcSupport libiodbc;
|
2019-08-11 17:17:41 +01:00
|
|
|
|
2021-01-22 11:25:31 +00:00
|
|
|
meta = with lib; {
|
2019-08-11 17:17:41 +01:00
|
|
|
description = "An R6RS/R7RS Scheme system";
|
|
|
|
longDescription = ''
|
|
|
|
Sagittarius Scheme is a free Scheme implementation supporting
|
|
|
|
R6RS/R7RS specification.
|
|
|
|
|
|
|
|
Features:
|
|
|
|
|
|
|
|
- Builtin CLOS.
|
|
|
|
- Common Lisp like reader macro.
|
|
|
|
- Cryptographic libraries.
|
|
|
|
- Customisable cipher and hash algorithm.
|
|
|
|
- Custom codec mechanism.
|
|
|
|
- CL like keyword lambda syntax (taken from Gauche).
|
|
|
|
- Constant definition form. (define-constant form).
|
|
|
|
- Builtin regular expression
|
|
|
|
- mostly works O(n)
|
|
|
|
- Replaceable reader
|
|
|
|
'';
|
|
|
|
homepage = "https://bitbucket.org/ktakashi/sagittarius-scheme";
|
|
|
|
license = licenses.bsd2;
|
|
|
|
platforms = platforms.all;
|
|
|
|
maintainers = with maintainers; [ abbe ];
|
|
|
|
};
|
|
|
|
}
|