nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 stdenv,
4 fetchFromGitHub,
5 gmp,
6 perl,
7}:
8
9stdenv.mkDerivation (finalAttrs: {
10 pname = "mosml";
11 version = "2.10.1";
12
13 buildInputs = [
14 gmp
15 perl
16 ];
17
18 makeFlags = [
19 "PREFIX=$(out)"
20 "CC=${stdenv.cc.targetPrefix}cc"
21 ];
22
23 # Version 2.10.1 (dated August 2014) breaks with newer compilers
24 env.NIX_CFLAGS_COMPILE = "-fpermissive -std=gnu17";
25
26 src = fetchFromGitHub {
27 owner = "kfl";
28 repo = "mosml";
29 rev = "ver-${finalAttrs.version}";
30 sha256 = "sha256-GK39WvM7NNhoC5f0Wjy4/5VWT+Rbh2qo+W71hWrbPso=";
31 };
32
33 setSourceRoot = ''export sourceRoot="$(echo */src)"'';
34
35 # MosML needs a specific RPATH entry pointing to $(out)/lib (added
36 # by the build system), which patchelf will remove.
37 dontPatchELF = true;
38
39 meta = {
40 description = "Light-weight implementation of Standard ML";
41 longDescription = ''
42 Moscow ML is a light-weight implementation of Standard ML (SML), a strict
43 functional language used in teaching and research.
44 '';
45 homepage = "https://mosml.org/";
46 license = lib.licenses.gpl2;
47 platforms = lib.platforms.unix;
48 maintainers = with lib.maintainers; [ vaibhavsagar ];
49 };
50})