Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at release-18.03 56 lines 2.2 kB view raw
1{ stdenv, fetchurl, pkgconfig, libtool, zip, libffi, libsigsegv, readline, gmp, 2gnutls, gnome2, cairo, SDL, sqlite, emacsSupport ? false, emacs ? null }: 3 4assert emacsSupport -> (emacs != null); 5 6let # The gnu-smalltalk project has a dependency to the libsigsegv library. 7 # The project ships with sources for this library, but deprecated this option. 8 # Using the vanilla libsigsegv library results in error: "cannot relocate [...]" 9 # Adding --enable-static=libsigsegv to the gnu-smalltalk configuration flags 10 # does not help, the error still occurs. The only solution is to build a 11 # shared version of libsigsegv. 12 libsigsegv-shared = stdenv.lib.overrideDerivation libsigsegv (oldAttrs: { 13 configureFlags = [ "--enable-shared" ]; 14 }); 15 16in stdenv.mkDerivation rec { 17 18 version = "3.2.5"; 19 name = "gnu-smalltalk-${version}"; 20 21 src = fetchurl { 22 url = "mirror://gnu/smalltalk/smalltalk-${version}.tar.xz"; 23 sha256 = "1k2ssrapfzhngc7bg1zrnd9n2vyxp9c9m70byvsma6wapbvib6l1"; 24 }; 25 26 # The dependencies and their justification are explained at 27 # http://smalltalk.gnu.org/download 28 nativeBuildInputs = [ pkgconfig ]; 29 buildInputs = [ 30 libtool zip libffi libsigsegv-shared readline gmp gnutls gnome2.gtk 31 cairo SDL sqlite 32 ] 33 ++ stdenv.lib.optional emacsSupport emacs; 34 35 configureFlags = stdenv.lib.optional (!emacsSupport) "--without-emacs"; 36 37 installFlags = stdenv.lib.optional emacsSupport "lispdir=$(out)/share/emacs/site-lisp"; 38 39 # For some reason the tests fail if executated with nix-build, but pass if 40 # executed within nix-shell --pure. 41 doCheck = false; 42 43 meta = with stdenv.lib; { 44 description = "A free implementation of the Smalltalk-80 language"; 45 longDescription = '' 46 GNU Smalltalk is a free implementation of the Smalltalk-80 language. It 47 runs on most POSIX compatible operating systems (including GNU/Linux, of 48 course), as well as under Windows. Smalltalk is a dynamic object-oriented 49 language, well-versed to scripting tasks. 50 ''; 51 homepage = http://smalltalk.gnu.org/; 52 license = with licenses; [ gpl2 lgpl2 ]; 53 platforms = platforms.linux; 54 maintainers = with maintainers; [ skeidel ]; 55 }; 56}