ocamlPackages.optint: 0.0.2 -> 0.0.3

Ensures compatibility with OCaml ≥ 4.08
This commit is contained in:
Vincent Laporte 2019-09-14 08:23:18 +00:00 committed by Vincent Laporte
parent c5f3851909
commit 827f62ef01
1 changed files with 9 additions and 19 deletions

View File

@ -1,28 +1,18 @@
{ stdenv, fetchurl, ocaml, findlib, dune }: { lib, buildDunePackage, fetchurl }:
if !stdenv.lib.versionAtLeast ocaml.version "4.02" buildDunePackage rec {
then throw "optint is not available for OCaml ${ocaml.version}" minimumOCamlVersion = "4.03";
else version = "0.0.3";
pname = "optint";
stdenv.mkDerivation rec {
version = "0.0.2";
name = "ocaml${ocaml.version}-optint-${version}";
src = fetchurl { src = fetchurl {
url = "https://github.com/mirage/optint/releases/download/v0.0.2/optint-v0.0.2.tbz"; url = "https://github.com/mirage/optint/releases/download/v${version}/optint-v${version}.tbz";
sha256 = "1lmb7nycmkr05y93slqi98i1lcs1w4kcngjzjwz7i230qqjpw9w1"; sha256 = "0c7r3s6lal9xkixngkj25nqncj4s33ka40bjdi7fz7mly08djycj";
}; };
buildInputs = [ ocaml findlib dune ];
buildPhase = "dune build";
inherit (dune) installPhase;
meta = { meta = {
homepage = "https://github.com/mirage/optint"; homepage = "https://github.com/mirage/optint";
description = "Abstract type of integer between x64 and x86 architecture"; description = "Abstract type of integer between x64 and x86 architecture";
license = stdenv.lib.licenses.mit; license = lib.licenses.mit;
maintainers = [ stdenv.lib.maintainers.vbgl ]; maintainers = [ lib.maintainers.vbgl ];
inherit (ocaml.meta) platforms;
}; };
} }