Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at flake-libs 57 lines 1.4 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 '' 19 substituteInPlace configure.ac \ 20 --replace-fail 'AC_FUNC_ALLOCA' "AC_FUNC_ALLOCA 21 AH_TEMPLATE([_Static_assert]) 22 AC_DEFINE([_Static_assert], [static_assert]) 23 " 24 '' 25 + lib.optionalString stdenv.hostPlatform.isDarwin '' 26 substituteInPlace configure.ac --replace-fail stdc++ c++ 27 ''; 28 29 patches = [ 30 # glibc 2.34 compat 31 (fetchpatch { 32 url = "https://src.fedoraproject.org/rpms/polyml/raw/4d8868ca5a1ce3268f212599a321f8011c950496/f/polyml-pthread-stack-min.patch"; 33 sha256 = "1h5ihg2sxld9ymrl3f2mpnbn2242ka1fsa0h4gl9h90kndvg6kby"; 34 }) 35 ]; 36 37 nativeBuildInputs = [ autoreconfHook ]; 38 39 src = fetchurl { 40 url = "mirror://sourceforge/polyml/polyml.${version}.tar.gz"; 41 sha256 = "05d6l2a5m9jf32a8kahwg2p2ph4x9rjf1nsl83331q3gwn5bkmr0"; 42 }; 43 44 meta = { 45 description = "Standard ML compiler and interpreter"; 46 longDescription = '' 47 Poly/ML is a full implementation of Standard ML. 48 ''; 49 homepage = "https://www.polyml.org/"; 50 license = lib.licenses.lgpl21; 51 platforms = with lib.platforms; linux; 52 maintainers = [ 53 # Add your name here! 54 lib.maintainers.maggesi 55 ]; 56 }; 57}