diff options
Diffstat (limited to 'pkgs/development/ocaml-modules/lablgtk/default.nix')
-rw-r--r-- | pkgs/development/ocaml-modules/lablgtk/default.nix | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/pkgs/development/ocaml-modules/lablgtk/default.nix b/pkgs/development/ocaml-modules/lablgtk/default.nix index 9d01b73479a4..ff42af0c0e40 100644 --- a/pkgs/development/ocaml-modules/lablgtk/default.nix +++ b/pkgs/development/ocaml-modules/lablgtk/default.nix @@ -1,18 +1,24 @@ { stdenv, fetchurl, ocaml, findlib, pkgconfig, gtk2, libgnomecanvas, libglade, gtksourceview }: -let - pname = "lablgtk"; +let param = + let check = stdenv.lib.versionAtLeast ocaml.version; in + if check "4.06" then { + version = "2.18.6"; + url = https://forge.ocamlcore.org/frs/download.php/1726/lablgtk-2.18.6.tar.gz; + sha256 = "1y38fdvswy6hmppm65qvgdk4pb3ghhnvz7n4ialf46340r1s5p2d"; + } else if check "3.12" then { + version = "2.18.5"; + url = https://forge.ocamlcore.org/frs/download.php/1627/lablgtk-2.18.5.tar.gz; + sha256 = "0cyj6sfdvzx8hw7553lhgwc0krlgvlza0ph3dk9gsxy047dm3wib"; + } else throw "lablgtk is not available for OCaml ${ocaml.version}"; in -assert stdenv.lib.versionAtLeast ocaml.version "3.12"; - stdenv.mkDerivation rec { - name = "${pname}-${version}"; - version = "2.18.5"; + name = "lablgtk-${version}"; + inherit (param) version; src = fetchurl { - url = https://forge.ocamlcore.org/frs/download.php/1627/lablgtk-2.18.5.tar.gz; - sha256 = "0cyj6sfdvzx8hw7553lhgwc0krlgvlza0ph3dk9gsxy047dm3wib"; + inherit (param) url sha256; }; nativeBuildInputs = [ pkgconfig ]; |