at master 1.3 kB view raw
1{ 2 lib, 3 stdenv, 4 fetchurl, 5 autoreconfHook, 6 fetchpatch, 7}: 8 9let 10 version = "5.6"; 11in 12 13stdenv.mkDerivation { 14 pname = "polyml"; 15 inherit version; 16 17 postPatch = '' 18 substituteInPlace configure.ac \ 19 --replace-fail 'AC_FUNC_ALLOCA' "AC_FUNC_ALLOCA 20 AH_TEMPLATE([_Static_assert]) 21 AC_DEFINE([_Static_assert], [static_assert]) 22 " 23 '' 24 + lib.optionalString stdenv.hostPlatform.isDarwin '' 25 substituteInPlace configure.ac --replace-fail stdc++ c++ 26 ''; 27 28 patches = [ 29 # glibc 2.34 compat 30 (fetchpatch { 31 url = "https://src.fedoraproject.org/rpms/polyml/raw/4d8868ca5a1ce3268f212599a321f8011c950496/f/polyml-pthread-stack-min.patch"; 32 sha256 = "1h5ihg2sxld9ymrl3f2mpnbn2242ka1fsa0h4gl9h90kndvg6kby"; 33 }) 34 ]; 35 36 nativeBuildInputs = [ autoreconfHook ]; 37 38 src = fetchurl { 39 url = "mirror://sourceforge/polyml/polyml.${version}.tar.gz"; 40 sha256 = "05d6l2a5m9jf32a8kahwg2p2ph4x9rjf1nsl83331q3gwn5bkmr0"; 41 }; 42 43 meta = { 44 description = "Standard ML compiler and interpreter"; 45 longDescription = '' 46 Poly/ML is a full implementation of Standard ML. 47 ''; 48 homepage = "https://www.polyml.org/"; 49 license = lib.licenses.lgpl21; 50 platforms = with lib.platforms; linux; 51 maintainers = [ 52 # Add your name here! 53 lib.maintainers.maggesi 54 ]; 55 }; 56}