tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
0
fork
atom
lol
0
fork
atom
overview
issues
pulls
pipelines
Added ocaml-cairo2-0.4.6
Jirka Marsik
11 years ago
257f629c
12fd14c4
+55
2 changed files
expand all
collapse all
unified
split
pkgs
development
ocaml-modules
ocaml-cairo2
default.nix
top-level
all-packages.nix
+53
pkgs/development/ocaml-modules/ocaml-cairo2/default.nix
···
1
1
+
{ stdenv, fetchurl, ocaml, findlib, pkgconfig, cairo, lablgtk, gtk,
2
2
+
enableGtkSupport ? true # Whether to compile with support for Gtk
3
3
+
# integration (library file cairo2_gtk). Depends
4
4
+
# on lablgtk and gtk.
5
5
+
}:
6
6
+
7
7
+
let
8
8
+
inherit (stdenv.lib) optionals;
9
9
+
pname = "ocaml-cairo2";
10
10
+
version = "0.4.6";
11
11
+
in
12
12
+
13
13
+
stdenv.mkDerivation {
14
14
+
15
15
+
name = "${pname}-${version}";
16
16
+
17
17
+
src = fetchurl {
18
18
+
url = "http://forge.ocamlcore.org/frs/download.php/1279/cairo2-0.4.6.tar.gz";
19
19
+
sha256 = "1lc1iv5yz49avbc0wbrw9nrx8dn0c35r7cykivjln1zc2fwscf7w";
20
20
+
};
21
21
+
22
22
+
buildInputs = [ ocaml findlib pkgconfig cairo ]
23
23
+
++ optionals enableGtkSupport [ gtk ];
24
24
+
25
25
+
# lablgtk2 is marked as a propagated build input since loading the
26
26
+
# cairo.lablgtk2 package from the toplevel tries to load lablgtk2 as
27
27
+
# well.
28
28
+
propagatedBuildInputs = optionals enableGtkSupport [ lablgtk ];
29
29
+
30
30
+
createFindlibDestdir = true;
31
31
+
32
32
+
configurePhase = "ocaml setup.ml -configure --prefix $out"
33
33
+
+ (if enableGtkSupport then " --enable-lablgtk2"
34
34
+
else " --disable-lablgtk2");
35
35
+
36
36
+
buildPhase = "ocaml setup.ml -build";
37
37
+
38
38
+
installPhase = "ocaml setup.ml -install";
39
39
+
40
40
+
meta = with stdenv.lib; {
41
41
+
homepage = "http://forge.ocamlcore.org/projects/cairo";
42
42
+
description = "Binding to Cairo, a 2D Vector Graphics Library";
43
43
+
longDescription = ''
44
44
+
This is a binding to Cairo, a 2D graphics library with support for
45
45
+
multiple output devices. Currently supported output targets include
46
46
+
the X Window System, Quartz, Win32, image buffers, PostScript, PDF,
47
47
+
and SVG file output.
48
48
+
'';
49
49
+
license = licenses.lgpl3;
50
50
+
platforms = ocaml.meta.platforms;
51
51
+
maintainers = [ maintainers.jirkamarsik ];
52
52
+
};
53
53
+
}
+2
pkgs/top-level/all-packages.nix
···
3504
3504
3505
3505
ocaml_cairo = callPackage ../development/ocaml-modules/ocaml-cairo { };
3506
3506
3507
3507
+
ocaml_cairo2 = callPackage ../development/ocaml-modules/ocaml-cairo2 { };
3508
3508
+
3507
3509
cmdliner = callPackage ../development/ocaml-modules/cmdliner { };
3508
3510
3509
3511
cppo = callPackage ../development/tools/ocaml/cppo { };