summary refs log tree commit diff
path: root/pkgs/development/ocaml-modules/cairo2
diff options
context:
space:
mode:
authorVincent Laporte <vbgl@users.noreply.github.com>2019-03-26 15:11:37 +0100
committerGitHub <noreply@github.com>2019-03-26 15:11:37 +0100
commit853b589f78cff37f458d823087b43c44da91938e (patch)
treec733b1a2c8b898d7a22ed55a1369e3153c4a6f26 /pkgs/development/ocaml-modules/cairo2
parent4ad932483c587144a8953866422bdaf292cf86e7 (diff)
downloadnixpkgs-853b589f78cff37f458d823087b43c44da91938e.tar
nixpkgs-853b589f78cff37f458d823087b43c44da91938e.tar.gz
nixpkgs-853b589f78cff37f458d823087b43c44da91938e.tar.bz2
nixpkgs-853b589f78cff37f458d823087b43c44da91938e.tar.lz
nixpkgs-853b589f78cff37f458d823087b43c44da91938e.tar.xz
nixpkgs-853b589f78cff37f458d823087b43c44da91938e.tar.zst
nixpkgs-853b589f78cff37f458d823087b43c44da91938e.zip
ocamlPackages.cairo2: 0.5 -> 0.6 (#57965)
Diffstat (limited to 'pkgs/development/ocaml-modules/cairo2')
-rw-r--r--pkgs/development/ocaml-modules/cairo2/default.nix46
1 files changed, 12 insertions, 34 deletions
diff --git a/pkgs/development/ocaml-modules/cairo2/default.nix b/pkgs/development/ocaml-modules/cairo2/default.nix
index b37dd413f69..1213120ce1c 100644
--- a/pkgs/development/ocaml-modules/cairo2/default.nix
+++ b/pkgs/development/ocaml-modules/cairo2/default.nix
@@ -1,43 +1,22 @@
-{ 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.
+{ stdenv, lib, fetchurl, buildDunePackage
+, pkgconfig, cairo
 }:
 
-let
-  inherit (stdenv.lib) optionals;
-  version = "0.5";
-in
-
-stdenv.mkDerivation {
-
-  name = "ocaml${ocaml.version}-cairo2-${version}";
+buildDunePackage rec {
+  pname = "cairo2";
+  version = "0.6";
 
   src = fetchurl {
-    url = "https://github.com/Chris00/ocaml-cairo/releases/download/${version}/cairo2-${version}.tar.gz";
-    sha256 = "1559df74rzh4v7c9hr6phymq1f5121s83q0xy3r83x4apj74dchj";
+    url = "https://github.com/Chris00/ocaml-cairo/releases/download/${version}/cairo2-${version}.tbz";
+    sha256 = "1k2q7ipmddqnd2clybj4qb5xwzzrnl2fxnd6kv60dlzgya18lchs";
   };
 
   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";
+  buildInputs = [ cairo ];
 
-  installPhase = "ocaml setup.ml -install";
+  doCheck = !stdenv.isDarwin;
 
-  meta = with stdenv.lib; {
+  meta = {
     homepage = "https://github.com/Chris00/ocaml-cairo";
     description = "Binding to Cairo, a 2D Vector Graphics Library";
     longDescription = ''
@@ -46,8 +25,7 @@ stdenv.mkDerivation {
       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 ];
+    license = lib.licenses.lgpl3;
+    maintainers = with lib.maintainers; [ jirkamarsik vbgl ];
   };
 }