diff options
author | Vincent Laporte <Vincent.Laporte@gmail.com> | 2019-02-13 21:26:50 +0000 |
---|---|---|
committer | Vincent Laporte <vbgl@users.noreply.github.com> | 2019-02-22 13:00:04 +0100 |
commit | b275d092249b6e2899d4bf93a87d69a41b965aae (patch) | |
tree | 6c878ea34233a1cf578ea75be7534ab02f0cca98 /pkgs/development/ocaml-modules/lablgtk3 | |
parent | baa9110d43e93f8799098cdf434e4a27b30831eb (diff) |
ocamlPackages.lablgtk3: 3.0.beta3 -> 3.0.beta4
Diffstat (limited to 'pkgs/development/ocaml-modules/lablgtk3')
-rw-r--r-- | pkgs/development/ocaml-modules/lablgtk3/default.nix | 33 | ||||
-rw-r--r-- | pkgs/development/ocaml-modules/lablgtk3/gtkspell3.nix | 8 | ||||
-rw-r--r-- | pkgs/development/ocaml-modules/lablgtk3/sourceview3.nix | 9 |
3 files changed, 39 insertions, 11 deletions
diff --git a/pkgs/development/ocaml-modules/lablgtk3/default.nix b/pkgs/development/ocaml-modules/lablgtk3/default.nix index 9f2227327e49e..8da00b76393a4 100644 --- a/pkgs/development/ocaml-modules/lablgtk3/default.nix +++ b/pkgs/development/ocaml-modules/lablgtk3/default.nix @@ -1,27 +1,38 @@ -{ stdenv, fetchurl, pkgconfig, ocaml, findlib, gtk3, gtkspell3, gtksourceview }: +{ stdenv,lib, fetchFromGitHub, pkgconfig, ocaml, findlib, dune, gtk3, cairo2 }: -if !stdenv.lib.versionAtLeast ocaml.version "4.05" +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 { - version = "3.0.beta3"; - name = "ocaml${ocaml.version}-lablgtk3-${version}"; - src = fetchurl { - url = https://forge.ocamlcore.org/frs/download.php/1775/lablgtk-3.0.beta3.tar.gz; - sha256 = "174mwwdz1s91a6ycbas7nc0g87c2l6zqv68zi5ab33yb76l46a6w"; + version = "3.0.beta4"; + pname = "lablgtk3"; + name = "ocaml${ocaml.version}-${pname}-${version}"; + + src = fetchFromGitHub { + owner = "garrigue"; + repo = "lablgtk"; + rev = version; + sha256 = "1lppb7k4xb1a35i7klm9mz98hw8l2f8s7rivgzysi1sviqy1ds5d"; }; nativeBuildInputs = [ pkgconfig ]; - buildInputs = [ ocaml findlib gtk3 gtkspell3 gtksourceview ]; + buildInputs = [ ocaml findlib dune gtk3 ]; + propagatedBuildInputs = [ cairo2 ]; - buildFlags = "world"; + buildPhase = "dune build -p ${pname}"; + inherit (dune) installPhase; meta = { description = "OCaml interface to gtk+-3"; homepage = "http://lablgtk.forge.ocamlcore.org/"; - license = stdenv.lib.licenses.lgpl21; - maintainers = [ stdenv.lib.maintainers.vbgl ]; + license = lib.licenses.lgpl21; + maintainers = [ lib.maintainers.vbgl ]; inherit (ocaml.meta) platforms; }; } diff --git a/pkgs/development/ocaml-modules/lablgtk3/gtkspell3.nix b/pkgs/development/ocaml-modules/lablgtk3/gtkspell3.nix new file mode 100644 index 0000000000000..7e898be749015 --- /dev/null +++ b/pkgs/development/ocaml-modules/lablgtk3/gtkspell3.nix @@ -0,0 +1,8 @@ +{ buildDunePackage, gtkspell3, lablgtk3 }: + +buildDunePackage rec { + pname = "lablgtk3-gtkspell3"; + buildInputs = [ gtkspell3 ] ++ lablgtk3.buildInputs; + propagatedBuildInputs = [ lablgtk3 ]; + inherit (lablgtk3) src version meta nativeBuildInputs; +} diff --git a/pkgs/development/ocaml-modules/lablgtk3/sourceview3.nix b/pkgs/development/ocaml-modules/lablgtk3/sourceview3.nix new file mode 100644 index 0000000000000..7e8807576eeb2 --- /dev/null +++ b/pkgs/development/ocaml-modules/lablgtk3/sourceview3.nix @@ -0,0 +1,9 @@ +{ stdenv, ocaml, gtksourceview, lablgtk3 }: + +stdenv.mkDerivation rec { + name = "ocaml${ocaml.version}-lablgtk3-sourceview3-${version}"; + buildPhase = "dune build -p lablgtk3-sourceview3"; + buildInputs = lablgtk3.buildInputs ++ [ gtksourceview ]; + propagatedBuildInputs = [ lablgtk3 ]; + inherit (lablgtk3) src version meta nativeBuildInputs installPhase; +} |