summary refs log tree commit diff
path: root/pkgs/development/ocaml-modules/facile
diff options
context:
space:
mode:
authorUlrik Strid <ulrik.strid@outlook.com>2022-03-04 11:34:13 +0100
committerVincent Laporte <vbgl@users.noreply.github.com>2022-03-25 13:55:18 +0100
commitd6e2e39a6e5998e4ad4cbd9d422835b365dfa763 (patch)
tree68a8543881ca262b91699cb3c4702ebbbac13b5c /pkgs/development/ocaml-modules/facile
parent661ee6b46824286320843905569061c4a5a2594b (diff)
downloadnixpkgs-d6e2e39a6e5998e4ad4cbd9d422835b365dfa763.tar
nixpkgs-d6e2e39a6e5998e4ad4cbd9d422835b365dfa763.tar.gz
nixpkgs-d6e2e39a6e5998e4ad4cbd9d422835b365dfa763.tar.bz2
nixpkgs-d6e2e39a6e5998e4ad4cbd9d422835b365dfa763.tar.lz
nixpkgs-d6e2e39a6e5998e4ad4cbd9d422835b365dfa763.tar.xz
nixpkgs-d6e2e39a6e5998e4ad4cbd9d422835b365dfa763.tar.zst
nixpkgs-d6e2e39a6e5998e4ad4cbd9d422835b365dfa763.zip
ocamlPackages.nonstd,facile: run `dune upgrade` for newer ocaml versions
This allows us to build the packages on OCaml >=4.12

Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
Diffstat (limited to 'pkgs/development/ocaml-modules/facile')
-rw-r--r--pkgs/development/ocaml-modules/facile/default.nix7
1 files changed, 4 insertions, 3 deletions
diff --git a/pkgs/development/ocaml-modules/facile/default.nix b/pkgs/development/ocaml-modules/facile/default.nix
index df228603e9f..3eab7d3417f 100644
--- a/pkgs/development/ocaml-modules/facile/default.nix
+++ b/pkgs/development/ocaml-modules/facile/default.nix
@@ -1,11 +1,9 @@
-{ lib, fetchurl, buildDunePackage }:
+{ lib, fetchurl, buildDunePackage, ocaml }:
 
 buildDunePackage rec {
   pname = "facile";
   version = "1.1.4";
 
-  useDune2 = false;
-
   src = fetchurl {
     url = "https://github.com/Emmanuel-PLF/facile/releases/download/${version}/facile-${version}.tbz";
     sha256 = "0jqrwmn6fr2vj2rrbllwxq4cmxykv7zh0y4vnngx29f5084a04jp";
@@ -13,6 +11,9 @@ buildDunePackage rec {
 
   doCheck = true;
 
+  useDune2 = lib.versionAtLeast ocaml.version "4.12";
+  postPatch = lib.optionalString useDune2 "dune upgrade";
+
   meta = {
     homepage = "http://opti.recherche.enac.fr/facile/";
     license = lib.licenses.lgpl21Plus;