From 12c5fe3e2dec6178cfef286ccc0a3078a0b63456 Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Sat, 9 Dec 2017 08:38:50 +0000 Subject: ocamlPackages.cairo2: 0.4.6 -> 0.5 --- pkgs/development/ocaml-modules/cairo2/default.nix | 53 +++++++++++++++++++++ .../ocaml-modules/ocaml-cairo2/default.nix | 54 ---------------------- 2 files changed, 53 insertions(+), 54 deletions(-) create mode 100644 pkgs/development/ocaml-modules/cairo2/default.nix delete mode 100644 pkgs/development/ocaml-modules/ocaml-cairo2/default.nix (limited to 'pkgs/development/ocaml-modules') diff --git a/pkgs/development/ocaml-modules/cairo2/default.nix b/pkgs/development/ocaml-modules/cairo2/default.nix new file mode 100644 index 000000000000..b37dd413f693 --- /dev/null +++ b/pkgs/development/ocaml-modules/cairo2/default.nix @@ -0,0 +1,53 @@ +{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, pkgconfig, cairo, lablgtk, gtk2, + enableGtkSupport ? true # Whether to compile with support for Gtk + # integration (library file cairo2_gtk). Depends + # on lablgtk and gtk2. +}: + +let + inherit (stdenv.lib) optionals; + version = "0.5"; +in + +stdenv.mkDerivation { + + name = "ocaml${ocaml.version}-cairo2-${version}"; + + src = fetchurl { + url = "https://github.com/Chris00/ocaml-cairo/releases/download/${version}/cairo2-${version}.tar.gz"; + sha256 = "1559df74rzh4v7c9hr6phymq1f5121s83q0xy3r83x4apj74dchj"; + }; + + nativeBuildInputs = [ pkgconfig ]; + buildInputs = [ ocaml findlib ocamlbuild cairo ] + ++ optionals enableGtkSupport [ gtk2 ]; + + # lablgtk2 is marked as a propagated build input since loading the + # cairo.lablgtk2 package from the toplevel tries to load lablgtk2 as + # well. + propagatedBuildInputs = optionals enableGtkSupport [ lablgtk ]; + + createFindlibDestdir = true; + + configurePhase = "ocaml setup.ml -configure --prefix $out" + + (if enableGtkSupport then " --enable-lablgtk2" + else " --disable-lablgtk2"); + + buildPhase = "ocaml setup.ml -build"; + + installPhase = "ocaml setup.ml -install"; + + meta = with stdenv.lib; { + homepage = "https://github.com/Chris00/ocaml-cairo"; + description = "Binding to Cairo, a 2D Vector Graphics Library"; + longDescription = '' + This is a binding to Cairo, a 2D graphics library with support for + multiple output devices. Currently supported output targets include + the X Window System, Quartz, Win32, image buffers, PostScript, PDF, + and SVG file output. + ''; + license = licenses.lgpl3; + platforms = ocaml.meta.platforms or []; + maintainers = [ maintainers.jirkamarsik ]; + }; +} diff --git a/pkgs/development/ocaml-modules/ocaml-cairo2/default.nix b/pkgs/development/ocaml-modules/ocaml-cairo2/default.nix deleted file mode 100644 index d9cab2a759da..000000000000 --- a/pkgs/development/ocaml-modules/ocaml-cairo2/default.nix +++ /dev/null @@ -1,54 +0,0 @@ -{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, pkgconfig, cairo, lablgtk, gtk2, - enableGtkSupport ? true # Whether to compile with support for Gtk - # integration (library file cairo2_gtk). Depends - # on lablgtk and gtk2. -}: - -let - inherit (stdenv.lib) optionals; - pname = "ocaml-cairo2"; - version = "0.4.6"; -in - -stdenv.mkDerivation { - - name = "${pname}-${version}"; - - src = fetchurl { - url = "http://forge.ocamlcore.org/frs/download.php/1279/cairo2-0.4.6.tar.gz"; - sha256 = "1lc1iv5yz49avbc0wbrw9nrx8dn0c35r7cykivjln1zc2fwscf7w"; - }; - - nativeBuildInputs = [ pkgconfig ]; - buildInputs = [ ocaml findlib ocamlbuild cairo ] - ++ optionals enableGtkSupport [ gtk2 ]; - - # lablgtk2 is marked as a propagated build input since loading the - # cairo.lablgtk2 package from the toplevel tries to load lablgtk2 as - # well. - propagatedBuildInputs = optionals enableGtkSupport [ lablgtk ]; - - createFindlibDestdir = true; - - configurePhase = "ocaml setup.ml -configure --prefix $out" - + (if enableGtkSupport then " --enable-lablgtk2" - else " --disable-lablgtk2"); - - buildPhase = "ocaml setup.ml -build"; - - installPhase = "ocaml setup.ml -install"; - - meta = with stdenv.lib; { - homepage = http://forge.ocamlcore.org/projects/cairo; - description = "Binding to Cairo, a 2D Vector Graphics Library"; - longDescription = '' - This is a binding to Cairo, a 2D graphics library with support for - multiple output devices. Currently supported output targets include - the X Window System, Quartz, Win32, image buffers, PostScript, PDF, - and SVG file output. - ''; - license = licenses.lgpl3; - platforms = ocaml.meta.platforms or []; - maintainers = [ maintainers.jirkamarsik ]; - }; -} -- cgit 1.4.1