about summary refs log tree commit diff
path: root/pkgs/development/ocaml-modules/lablgtk3/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/ocaml-modules/lablgtk3/default.nix')
-rw-r--r--pkgs/development/ocaml-modules/lablgtk3/default.nix22
1 files changed, 5 insertions, 17 deletions
diff --git a/pkgs/development/ocaml-modules/lablgtk3/default.nix b/pkgs/development/ocaml-modules/lablgtk3/default.nix
index 26131d0a98c8..7c6198add622 100644
--- a/pkgs/development/ocaml-modules/lablgtk3/default.nix
+++ b/pkgs/development/ocaml-modules/lablgtk3/default.nix
@@ -1,18 +1,10 @@
-{ stdenv,lib, fetchFromGitHub, pkgconfig, ocaml, findlib, dune, gtk3, cairo2 }:
+{ lib, fetchFromGitHub, pkgconfig, buildDunePackage, gtk3, cairo2 }:
 
-if !lib.versionAtLeast ocaml.version "4.05"
-then throw "lablgtk3 is not available for OCaml ${ocaml.version}"
-else
-
-# This package uses the dune.configurator library
-# It thus needs said library to be compiled with this OCaml compiler
-let __dune = dune; in
-let dune = __dune.override { ocamlPackages = { inherit ocaml findlib; }; }; in
-
-stdenv.mkDerivation rec {
+buildDunePackage rec {
   version = "3.0.beta5";
   pname = "lablgtk3";
-  name = "ocaml${ocaml.version}-${pname}-${version}";
+
+  minimumOCamlVersion = "4.05";
 
   src = fetchFromGitHub {
     owner = "garrigue";
@@ -22,17 +14,13 @@ stdenv.mkDerivation rec {
   };
 
   nativeBuildInputs = [ pkgconfig ];
-  buildInputs = [ ocaml findlib dune gtk3 ];
+  buildInputs = [ gtk3 ];
   propagatedBuildInputs = [ cairo2 ];
 
-  buildPhase = "dune build -p ${pname}";
-  inherit (dune) installPhase;
-
   meta = {
     description = "OCaml interface to gtk+-3";
     homepage = "http://lablgtk.forge.ocamlcore.org/";
     license = lib.licenses.lgpl21;
     maintainers = [ lib.maintainers.vbgl ];
-    inherit (ocaml.meta) platforms;
   };
 }