diff --git a/pkgs/by-name/gn/gnu-smalltalk/0001-fix-compilation.patch b/pkgs/by-name/gn/gnu-smalltalk/0001-fix-compilation.patch new file mode 100644 index 000000000000..1784942f3ed0 --- /dev/null +++ b/pkgs/by-name/gn/gnu-smalltalk/0001-fix-compilation.patch @@ -0,0 +1,26 @@ +diff --git a/packages/iconv/iconv.c b/packages/iconv/iconv.c +index ba2c38a7..55c2e737 100644 +--- a/packages/iconv/iconv.c ++++ b/packages/iconv/iconv.c +@@ -66,7 +66,7 @@ iconvWrapper (iconv_t handle, OOP readBufferOOP, int readPos, + int readCount, OOP writeBufferOOP, int writeCount, + OOP bytesLeftOOP) + { +- const char *inbuf; ++ char *inbuf; + size_t inbytesleft; + char *outbuf; + size_t outbytesleft; +diff --git a/packages/xml/expat/expat.c b/packages/xml/expat/expat.c +index 0ceee46c..4ea35289 100644 +--- a/packages/xml/expat/expat.c ++++ b/packages/xml/expat/expat.c +@@ -573,7 +573,7 @@ gst_XML_ParserCreate (OOP parserOOP) + XML_SetNotationDeclHandler (p, gst_NotationDeclHandler); + XML_SetStartNamespaceDeclHandler (p, gst_StartNamespaceDeclHandler); + XML_SetEndNamespaceDeclHandler (p, gst_EndNamespaceDeclHandler); +- XML_SetSkippedEntityHandler (p, gst_SkippedEntityHandler); ++ XML_SetSkippedEntityHandler (p, (void (*)(void *, const XML_Char *, int))(gst_SkippedEntityHandler)); + XML_SetReturnNSTriplet (p, true); + + if (!saxEventSequenceClass) diff --git a/pkgs/by-name/gn/gnu-smalltalk/package.nix b/pkgs/by-name/gn/gnu-smalltalk/package.nix index 07d83d8bdd13..7ca522465f7f 100644 --- a/pkgs/by-name/gn/gnu-smalltalk/package.nix +++ b/pkgs/by-name/gn/gnu-smalltalk/package.nix @@ -33,22 +33,24 @@ let }); in -stdenv.mkDerivation rec { - - version = "3.2.5"; +stdenv.mkDerivation (finalAttrs: { pname = "gnu-smalltalk"; + version = "3.2.5"; src = fetchurl { - url = "mirror://gnu/smalltalk/smalltalk-${version}.tar.xz"; - sha256 = "1k2ssrapfzhngc7bg1zrnd9n2vyxp9c9m70byvsma6wapbvib6l1"; + url = "mirror://gnu/smalltalk/smalltalk-${finalAttrs.version}.tar.xz"; + hash = "sha256-gZoV97qKG1X19gucmli63W9hU7P5h7cOexZ+d1XWWsw="; }; patches = [ # The awk script incorrectly parsed `glib/glib.h` and was trying to find `glib/gwin32.h`, # that isn't included since we're building only for linux. ./0000-fix_mkorder.patch + ./0001-fix-compilation.patch ]; + enableParallelBuilding = true; + # The dependencies and their justification are explained at # http://smalltalk.gnu.org/download nativeBuildInputs = [ pkg-config ]; @@ -71,13 +73,13 @@ stdenv.mkDerivation rec { hardeningDisable = [ "format" ]; - installFlags = lib.optional emacsSupport "lispdir=$(out)/share/emacs/site-lisp"; + installFlags = lib.optional emacsSupport "lispdir=${placeholder "$out"}/share/emacs/site-lisp"; # For some reason the tests fail if executated with nix-build, but pass if # executed within nix-shell --pure. doCheck = false; - meta = with lib; { + meta = { description = "Free implementation of the Smalltalk-80 language"; longDescription = '' GNU Smalltalk is a free implementation of the Smalltalk-80 language. It @@ -86,11 +88,11 @@ stdenv.mkDerivation rec { language, well-versed to scripting tasks. ''; homepage = "http://smalltalk.gnu.org/"; - license = with licenses; [ + license = with lib.licenses; [ gpl2 lgpl2 ]; - platforms = platforms.linux; - maintainers = with maintainers; [ ]; + platforms = lib.platforms.linux; + maintainers = with lib.maintainers; [ ]; }; -} +})