2021-01-22 12:25:31 +01:00
|
|
|
{ config, lib, stdenv, fetchurl, pkg-config, libtool
|
2019-02-03 16:32:18 +01:00
|
|
|
, zip, libffi, libsigsegv, readline, gmp
|
2021-03-16 18:22:15 +01:00
|
|
|
, gnutls, gtk2, cairo, SDL, sqlite
|
2019-02-03 16:32:18 +01:00
|
|
|
, emacsSupport ? config.emacsSupport or false, emacs ? null }:
|
2015-04-01 13:51:56 +02:00
|
|
|
|
|
|
|
assert emacsSupport -> (emacs != null);
|
2015-03-27 16:59:46 +01:00
|
|
|
|
|
|
|
let # The gnu-smalltalk project has a dependency to the libsigsegv library.
|
|
|
|
# The project ships with sources for this library, but deprecated this option.
|
|
|
|
# Using the vanilla libsigsegv library results in error: "cannot relocate [...]"
|
|
|
|
# Adding --enable-static=libsigsegv to the gnu-smalltalk configuration flags
|
|
|
|
# does not help, the error still occurs. The only solution is to build a
|
|
|
|
# shared version of libsigsegv.
|
2021-01-22 12:25:31 +01:00
|
|
|
libsigsegv-shared = lib.overrideDerivation libsigsegv (oldAttrs: {
|
2015-03-27 16:59:46 +01:00
|
|
|
configureFlags = [ "--enable-shared" ];
|
|
|
|
});
|
|
|
|
|
|
|
|
in stdenv.mkDerivation rec {
|
|
|
|
|
|
|
|
version = "3.2.5";
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "gnu-smalltalk";
|
2015-03-27 16:59:46 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "mirror://gnu/smalltalk/smalltalk-${version}.tar.xz";
|
|
|
|
sha256 = "1k2ssrapfzhngc7bg1zrnd9n2vyxp9c9m70byvsma6wapbvib6l1";
|
|
|
|
};
|
|
|
|
|
|
|
|
# The dependencies and their justification are explained at
|
|
|
|
# http://smalltalk.gnu.org/download
|
2021-01-19 07:50:56 +01:00
|
|
|
nativeBuildInputs = [ pkg-config ];
|
2015-03-27 16:59:46 +01:00
|
|
|
buildInputs = [
|
2021-03-16 18:22:15 +01:00
|
|
|
libtool zip libffi libsigsegv-shared readline gmp gnutls gtk2
|
2015-03-27 16:59:46 +01:00
|
|
|
cairo SDL sqlite
|
2015-04-01 13:51:56 +02:00
|
|
|
]
|
2021-01-22 12:25:31 +01:00
|
|
|
++ lib.optional emacsSupport emacs;
|
2015-04-01 13:51:56 +02:00
|
|
|
|
2021-01-22 12:25:31 +01:00
|
|
|
configureFlags = lib.optional (!emacsSupport) "--without-emacs";
|
2015-03-27 16:59:46 +01:00
|
|
|
|
2018-09-05 23:01:15 +02:00
|
|
|
hardeningDisable = [ "format" ];
|
|
|
|
|
2021-01-22 12:25:31 +01:00
|
|
|
installFlags = lib.optional emacsSupport "lispdir=$(out)/share/emacs/site-lisp";
|
2015-03-27 16:59:46 +01:00
|
|
|
|
|
|
|
# For some reason the tests fail if executated with nix-build, but pass if
|
|
|
|
# executed within nix-shell --pure.
|
|
|
|
doCheck = false;
|
|
|
|
|
2021-01-22 12:25:31 +01:00
|
|
|
meta = with lib; {
|
2015-03-27 16:59:46 +01:00
|
|
|
description = "A free implementation of the Smalltalk-80 language";
|
|
|
|
longDescription = ''
|
|
|
|
GNU Smalltalk is a free implementation of the Smalltalk-80 language. It
|
|
|
|
runs on most POSIX compatible operating systems (including GNU/Linux, of
|
|
|
|
course), as well as under Windows. Smalltalk is a dynamic object-oriented
|
|
|
|
language, well-versed to scripting tasks.
|
|
|
|
'';
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "http://smalltalk.gnu.org/";
|
2015-03-27 16:59:46 +01:00
|
|
|
license = with licenses; [ gpl2 lgpl2 ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = with maintainers; [ skeidel ];
|
|
|
|
};
|
|
|
|
}
|