Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib 2, stdenv 3, fetchFromGitHub 4, autoreconfHook 5, gmp 6, libffi 7}: 8 9stdenv.mkDerivation rec { 10 pname = "polyml"; 11 version = "5.9"; 12 13 prePatch = lib.optionalString stdenv.isDarwin '' 14 substituteInPlace configure.ac --replace stdc++ c++ 15 ''; 16 17 buildInputs = [ libffi gmp ]; 18 19 nativeBuildInputs = lib.optional stdenv.isDarwin autoreconfHook; 20 21 configureFlags = [ 22 "--enable-shared" 23 "--with-system-libffi" 24 "--with-gmp" 25 ]; 26 27 src = fetchFromGitHub { 28 owner = "polyml"; 29 repo = "polyml"; 30 rev = "v${version}"; 31 sha256 = "sha256-4oo4AB54CivhS99RuZVTP9+Ic0CDpsBb+OiHvOhmZnM="; 32 }; 33 34 meta = with lib; { 35 description = "Standard ML compiler and interpreter"; 36 longDescription = '' 37 Poly/ML is a full implementation of Standard ML. 38 ''; 39 homepage = "https://www.polyml.org/"; 40 license = licenses.lgpl21; 41 platforms = with platforms; (linux ++ darwin); 42 maintainers = with maintainers; [ maggesi kovirobi ]; 43 }; 44}