From 608dbf662c52e29db0143d8b9c4c3e31c8f6e1a8 Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Fri, 8 May 2020 08:25:16 +0200 Subject: [PATCH] =?UTF-8?q?ocamlPackages.lablgtk:=202.18.8=20=E2=86=92=202?= =?UTF-8?q?.18.10?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This ensures compatibility with OCaml 4.10 --- .../ocaml-modules/lablgtk/default.nix | 26 ++++++++++--------- 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/pkgs/development/ocaml-modules/lablgtk/default.nix b/pkgs/development/ocaml-modules/lablgtk/default.nix index e9ad3104d3f0..2b6c3028fd6c 100644 --- a/pkgs/development/ocaml-modules/lablgtk/default.nix +++ b/pkgs/development/ocaml-modules/lablgtk/default.nix @@ -1,25 +1,27 @@ -{ stdenv, fetchurl, ocaml, findlib, pkgconfig, gtk2, libgnomecanvas, libglade, gtksourceview }: +{ stdenv, fetchurl, fetchFromGitHub, ocaml, findlib, pkgconfig, gtk2, libgnomecanvas, libglade, gtksourceview }: let param = let check = stdenv.lib.versionAtLeast ocaml.version; in - if check "4.06" then { - version = "2.18.8"; - url = "https://github.com/garrigue/lablgtk/releases/download/lablgtk2188/lablgtk-2.18.8.tar.gz"; - sha256 = "1qsd9nv96fxddc8zayqiqxw9hcyf29axckqg100fm2brs2prpxci"; + if check "4.06" then rec { + version = "2.18.10"; + src = fetchFromGitHub { + owner = "garrigue"; + repo = "lablgtk"; + rev = version; + sha256 = "0w8cdfcv2wc19sd3qzj3qq77qc6rbnbynsz02gzbl15kgrvgrfxi"; + }; } 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"; + src = fetchurl { + 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 stdenv.mkDerivation { pname = "lablgtk"; - inherit (param) version; - - src = fetchurl { - inherit (param) url sha256; - }; + inherit (param) version src; nativeBuildInputs = [ pkgconfig ]; buildInputs = [ ocaml findlib gtk2 libgnomecanvas libglade gtksourceview ];