tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
ber_metaocaml: (re)init at 104
Matthew Pickering
8 years ago
08dfb956
994a614c
+86
2 changed files
expand all
collapse all
unified
split
pkgs
development
compilers
ocaml
ber-metaocaml-104.nix
top-level
all-packages.nix
+84
pkgs/development/compilers/ocaml/ber-metaocaml-104.nix
···
1
1
+
{ stdenv, fetchurl, ncurses, libX11, xproto, buildEnv }:
2
2
+
3
3
+
let
4
4
+
useX11 = stdenv.isi686 || stdenv.isx86_64;
5
5
+
useNativeCompilers = stdenv.isi686 || stdenv.isx86_64 || stdenv.isMips;
6
6
+
inherit (stdenv.lib) optionals optionalString;
7
7
+
in
8
8
+
9
9
+
stdenv.mkDerivation rec {
10
10
+
11
11
+
name = "ber-metaocaml-${version}";
12
12
+
version = "104";
13
13
+
14
14
+
src = fetchurl {
15
15
+
url = "http://caml.inria.fr/pub/distrib/ocaml-4.04/ocaml-4.04.0.tar.gz";
16
16
+
sha256 = "1pi2hdm9lxhn45qvfqfss1hpa4jijm14qgmrgajsadxqdiplhqyb";
17
17
+
};
18
18
+
19
19
+
metaocaml = fetchurl {
20
20
+
url = "http://okmij.org/ftp/ML/ber-metaocaml-104.tar.gz";
21
21
+
sha256 = "1gmwlxairxqcmqa2r6kbf8b4dxc7pfhfbh48g1s14d3z20rj8nib";
22
22
+
};
23
23
+
24
24
+
# Needed to avoid a SIGBUS on the final executable on mips
25
25
+
NIX_CFLAGS_COMPILE = if stdenv.isMips then "-fPIC" else "";
26
26
+
27
27
+
x11env = buildEnv { name = "x11env"; paths = [libX11 xproto];};
28
28
+
x11lib = x11env + "/lib";
29
29
+
x11inc = x11env + "/include";
30
30
+
31
31
+
prefixKey = "-prefix ";
32
32
+
configureFlags = optionals useX11 [ "-x11lib" x11lib
33
33
+
"-x11include" x11inc ];
34
34
+
35
35
+
dontStrip = true;
36
36
+
buildInputs = [ncurses] ++ optionals useX11 [ libX11 xproto ];
37
37
+
installFlags = "-i";
38
38
+
installTargets = "install"; # + optionalString useNativeCompilers " installopt";
39
39
+
40
40
+
postConfigure = ''
41
41
+
tar -xvzf $metaocaml
42
42
+
cd ${name}
43
43
+
make patch
44
44
+
cd ..
45
45
+
'';
46
46
+
buildPhase = ''
47
47
+
make world
48
48
+
make -i install
49
49
+
50
50
+
make bootstrap
51
51
+
make opt.opt
52
52
+
make installopt
53
53
+
mkdir -p $out/include
54
54
+
ln -sv $out/lib/ocaml/caml $out/include/caml
55
55
+
cd ${name}
56
56
+
make all
57
57
+
make install
58
58
+
make install.opt
59
59
+
cd ..
60
60
+
'';
61
61
+
installPhase = "";
62
62
+
postBuild = ''
63
63
+
'';
64
64
+
checkPhase = ''
65
65
+
cd ${name}
66
66
+
make test
67
67
+
make test-compile
68
68
+
make test-native
69
69
+
cd ..
70
70
+
'';
71
71
+
72
72
+
meta = with stdenv.lib; {
73
73
+
homepage = "http://okmij.org/ftp/ML/index.html#ber-metaocaml";
74
74
+
license = with licenses; [
75
75
+
qpl /* compiler */
76
76
+
lgpl2 /* library */
77
77
+
];
78
78
+
description = "Conservative extension of OCaml";
79
79
+
longDescription = ''
80
80
+
A conservative extension of OCaml with the primitive type of code values,
81
81
+
and three basic multi-stage expression forms: Brackets, Escape, and Run
82
82
+
'';
83
83
+
};
84
84
+
}
+2
pkgs/top-level/all-packages.nix
···
6260
6260
6261
6261
ber_metaocaml_003 = callPackage ../development/compilers/ocaml/ber-metaocaml-003.nix { };
6262
6262
6263
6263
+
ber_metaocaml = callPackage ../development/compilers/ocaml/ber-metaocaml-104.nix { };
6264
6264
+
6263
6265
ocaml_make = callPackage ../development/ocaml-modules/ocamlmake { };
6264
6266
6265
6267
ocaml-top = callPackage ../development/tools/ocaml/ocaml-top { };