about summary refs log tree commit diff
path: root/pkgs/development/compilers/mosml/default.nix
blob: 26ce0365a6cd4eca28a5b3c143e400c2853eadfa (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
{ lib, stdenv, fetchFromGitHub, gmp, perl }:

stdenv.mkDerivation rec {
  pname = "mosml";
  version = "2.10.1";

  buildInputs = [ gmp perl ];

  makeFlags = [ "PREFIX=$(out)" "CC=${stdenv.cc.targetPrefix}cc" ];

  src = fetchFromGitHub {
    owner = "kfl";
    repo = "mosml";
    rev = "ver-${version}";
    sha256 = "sha256-GK39WvM7NNhoC5f0Wjy4/5VWT+Rbh2qo+W71hWrbPso=";
  };

  setSourceRoot = ''export sourceRoot="$(echo */src)"'';

  # MosML needs a specific RPATH entry pointing to $(out)/lib (added
  # by the build system), which patchelf will remove.
  dontPatchELF = true;

  meta = with lib; {
    description = "Light-weight implementation of Standard ML";
    longDescription = ''
      Moscow ML is a light-weight implementation of Standard ML (SML), a strict
      functional language used in teaching and research.
    '';
    homepage = "https://mosml.org/";
    license = licenses.gpl2;
    platforms = platforms.unix;
    maintainers = with maintainers; [ vaibhavsagar ];
  };
}