forked from mirrors/nixpkgs
ocamlPackages.lablgtk3: use buildDunePackage
This commit is contained in:
parent
f56d52bbc3
commit
6a45d871c7
|
@ -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"
|
buildDunePackage rec {
|
||||||
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.beta5";
|
version = "3.0.beta5";
|
||||||
pname = "lablgtk3";
|
pname = "lablgtk3";
|
||||||
name = "ocaml${ocaml.version}-${pname}-${version}";
|
|
||||||
|
minimumOCamlVersion = "4.05";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "garrigue";
|
owner = "garrigue";
|
||||||
|
@ -22,17 +14,13 @@ stdenv.mkDerivation rec {
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ pkgconfig ];
|
nativeBuildInputs = [ pkgconfig ];
|
||||||
buildInputs = [ ocaml findlib dune gtk3 ];
|
buildInputs = [ gtk3 ];
|
||||||
propagatedBuildInputs = [ cairo2 ];
|
propagatedBuildInputs = [ cairo2 ];
|
||||||
|
|
||||||
buildPhase = "dune build -p ${pname}";
|
|
||||||
inherit (dune) installPhase;
|
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
description = "OCaml interface to gtk+-3";
|
description = "OCaml interface to gtk+-3";
|
||||||
homepage = "http://lablgtk.forge.ocamlcore.org/";
|
homepage = "http://lablgtk.forge.ocamlcore.org/";
|
||||||
license = lib.licenses.lgpl21;
|
license = lib.licenses.lgpl21;
|
||||||
maintainers = [ lib.maintainers.vbgl ];
|
maintainers = [ lib.maintainers.vbgl ];
|
||||||
inherit (ocaml.meta) platforms;
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,9 +1,8 @@
|
||||||
{ stdenv, ocaml, gtksourceview, lablgtk3 }:
|
{ buildDunePackage, gtksourceview, lablgtk3 }:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
buildDunePackage rec {
|
||||||
name = "ocaml${ocaml.version}-lablgtk3-sourceview3-${version}";
|
pname = "lablgtk3-sourceview3";
|
||||||
buildPhase = "dune build -p lablgtk3-sourceview3";
|
|
||||||
buildInputs = lablgtk3.buildInputs ++ [ gtksourceview ];
|
buildInputs = lablgtk3.buildInputs ++ [ gtksourceview ];
|
||||||
propagatedBuildInputs = [ lablgtk3 ];
|
propagatedBuildInputs = [ lablgtk3 ];
|
||||||
inherit (lablgtk3) src version meta nativeBuildInputs installPhase;
|
inherit (lablgtk3) src version meta nativeBuildInputs;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue