From 17e0d73278e5fd172cb7d62b662bcb457e4a0951 Mon Sep 17 00:00:00 2001
From: Vincent Laporte <Vincent.Laporte@gmail.com>
Date: Sat, 9 Nov 2019 15:48:22 +0000
Subject: [PATCH] =?UTF-8?q?ocamlPackages.facile:=201.1.3=20=E2=86=92=201.1?=
 =?UTF-8?q?.4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 .../ocaml-modules/facile/default.nix          | 35 +++++--------------
 1 file changed, 8 insertions(+), 27 deletions(-)

diff --git a/pkgs/development/ocaml-modules/facile/default.nix b/pkgs/development/ocaml-modules/facile/default.nix
index e8553ebf812..8834de53a8f 100644
--- a/pkgs/development/ocaml-modules/facile/default.nix
+++ b/pkgs/development/ocaml-modules/facile/default.nix
@@ -1,38 +1,19 @@
-{ stdenv, fetchurl, ocaml, findlib }:
+{ lib, fetchurl, buildDunePackage }:
 
-stdenv.mkDerivation rec {
-  name = "ocaml${ocaml.version}-facile-${version}";
-
-  version = "1.1.3";
+buildDunePackage rec {
+  pname = "facile";
+  version = "1.1.4";
 
   src = fetchurl {
-    url = "http://opti.recherche.enac.fr/facile/distrib/facile-${version}.tar.gz";
-    sha256 = "1v4apqcw4gm36ph5xwf1wxaaza0ggvihvgsdslnf33fa1pdkvdjw";
+    url = "https://github.com/Emmanuel-PLF/facile/releases/download/${version}/facile-${version}.tbz";
+    sha256 = "0jqrwmn6fr2vj2rrbllwxq4cmxykv7zh0y4vnngx29f5084a04jp";
   };
 
-  dontAddPrefix = 1;
-
-  buildInputs = [ ocaml findlib ];
-
-  createFindlibDestdir = true;
-
-  installFlags = [ "FACILEDIR=$(OCAMLFIND_DESTDIR)/facile" ];
-
-  postInstall = ''
-    cat > $OCAMLFIND_DESTDIR/facile/META <<EOF
-    version = "${version}"
-    name = "facile"
-    description = "A Functional Constraint Library"
-    requires = ""
-    archive(byte) = "facile.cma"
-    archive(native) = "facile.cmxa"
-    EOF
-  '';
+  doCheck = true;
 
   meta = {
     homepage = "http://opti.recherche.enac.fr/facile/";
-    license = stdenv.lib.licenses.lgpl21Plus;
+    license = lib.licenses.lgpl21Plus;
     description = "A Functional Constraint Library";
-    platforms = stdenv.lib.platforms.unix;
   };
 }