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