tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
0
fork
atom
lol
0
fork
atom
overview
issues
pulls
pipelines
ocamlPackages.optcomp: fix build with OCaml 4.06
Vincent Laporte
8 years ago
50b0afa2
b76f0ed3
+35
-1
2 changed files
expand all
collapse all
unified
split
pkgs
development
ocaml-modules
optcomp
META
default.nix
+12
pkgs/development/ocaml-modules/optcomp/META
reviewed
···
1
1
+
# OASIS_START
2
2
+
# DO NOT EDIT (digest: ec844fa3189acb2a866b89a69d111ba4)
3
3
+
version = "1.6"
4
4
+
description = "Optional compilation with cpp-like directives"
5
5
+
requires = "camlp4"
6
6
+
archive(syntax, preprocessor) = "optcomp.cma"
7
7
+
archive(syntax, toploop) = "optcomp.cma"
8
8
+
archive(syntax, preprocessor, native) = "optcomp.cmxa"
9
9
+
archive(syntax, preprocessor, native, plugin) = "optcomp.cmxs"
10
10
+
exists_if = "optcomp.cma"
11
11
+
# OASIS_STOP
12
12
+
+23
-1
pkgs/development/ocaml-modules/optcomp/default.nix
reviewed
···
1
1
-
{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, camlp4 }:
1
1
+
{ stdenv, fetchurl, fetchpatch, ocaml, findlib, ocamlbuild, camlp4 }:
2
2
3
3
stdenv.mkDerivation {
4
4
name = "ocaml-optcomp-1.6";
···
6
6
url = https://github.com/diml/optcomp/archive/1.6.tar.gz;
7
7
sha256 = "0hhhb2gisah1h22zlg5iszbgqxdd7x85cwd57bd4mfkx9l7dh8jh";
8
8
};
9
9
+
10
10
+
patches =
11
11
+
let inherit (stdenv.lib) optional versionAtLeast; in
12
12
+
optional (versionAtLeast ocaml.version "4.02") (fetchpatch {
13
13
+
url = "https://github.com/diml/optcomp/commit/b7f809360c9794b383a4bc0492f6df381276b429.patch";
14
14
+
sha256 = "1n095lk94jq1rwi0l24g2wbgms7249wdd31n0ji895dr6755s93y";
15
15
+
})
16
16
+
;
9
17
10
18
createFindlibDestdir = true;
11
19
12
20
buildInputs = [ ocaml findlib ocamlbuild camlp4 ];
13
21
22
22
+
configurePhase = ''
23
23
+
cp ${./META} META
24
24
+
'';
25
25
+
26
26
+
buildPhase = ''
27
27
+
ocamlbuild src/optcomp.cmxs src/optcomp.cma src/optcomp_o.native src/optcomp_r.native
28
28
+
'';
29
29
+
30
30
+
installPhase = ''
31
31
+
mkdir -p $out/bin
32
32
+
cp _build/src/optcomp_o.native $out/bin/optcomp-o
33
33
+
cp _build/src/optcomp_r.native $out/bin/optcomp-r
34
34
+
ocamlfind install optcomp META _build/src/optcomp.{a,cma,cmxa,cmxs} _build/src/pa_optcomp.{cmi,cmx,mli}
35
35
+
'';
14
36
15
37
meta = {
16
38
homepage = https://github.com/diml/optcomp;