ocamlPackages.base64: 2.0.0 -> 3.2.0

Keep the legacy version under attribute `base64_2`
This commit is contained in:
Vincent Laporte 2019-04-06 13:17:37 +00:00
parent 4a985a67c5
commit 3a10042c81
No known key found for this signature in database
GPG key ID: EBD582ADDDB1F81F
3 changed files with 50 additions and 13 deletions

View file

@ -0,0 +1,24 @@
{ stdenv, fetchzip, ocaml, findlib, ocamlbuild }:
let version = "2.0.0"; in
stdenv.mkDerivation {
name = "ocaml-base64-${version}";
src = fetchzip {
url = "https://github.com/mirage/ocaml-base64/archive/v${version}.tar.gz";
sha256 = "1nv55gwq5vaxmrcz9ja2s165b1p9fhcxszc1l76043gpa56qm4fs";
};
buildInputs = [ ocaml findlib ocamlbuild ];
createFindlibDestdir = true;
meta = {
homepage = https://github.com/mirage/ocaml-base64;
platforms = ocaml.meta.platforms or [];
description = "Base64 encoding and decoding in OCaml";
license = stdenv.lib.licenses.isc;
maintainers = with stdenv.lib.maintainers; [ vbgl ];
};
}

View file

@ -1,24 +1,26 @@
{ stdenv, fetchzip, ocaml, findlib, ocamlbuild }:
{ lib, fetchzip, buildDunePackage, alcotest, bos }:
let version = "2.0.0"; in
let version = "3.2.0"; in
stdenv.mkDerivation {
name = "ocaml-base64-${version}";
buildDunePackage {
pname = "base64";
inherit version;
src = fetchzip {
url = "https://github.com/mirage/ocaml-base64/archive/v${version}.tar.gz";
sha256 = "1nv55gwq5vaxmrcz9ja2s165b1p9fhcxszc1l76043gpa56qm4fs";
sha256 = "1ilw3zj0w6cq7i4pvr8m2kv5l5f2y9aldmv72drlwwns013b1gwy";
};
buildInputs = [ ocaml findlib ocamlbuild ];
minimumOCamlVersion = "4.03";
createFindlibDestdir = true;
buildInputs = [ alcotest bos ];
doCheck = true;
meta = {
homepage = https://github.com/mirage/ocaml-base64;
platforms = ocaml.meta.platforms or [];
description = "Base64 encoding and decoding in OCaml";
license = stdenv.lib.licenses.isc;
maintainers = with stdenv.lib.maintainers; [ vbgl ];
license = lib.licenses.isc;
maintainers = with lib.maintainers; [ vbgl ];
};
}

View file

@ -53,6 +53,8 @@ let
atdgen = callPackage ../development/ocaml-modules/atdgen { };
base64_2 = callPackage ../development/ocaml-modules/base64/2.0.nix { };
base64 = callPackage ../development/ocaml-modules/base64 { };
bap = callPackage ../development/ocaml-modules/bap {
@ -144,12 +146,15 @@ let
cmdliner = callPackage ../development/ocaml-modules/cmdliner { };
cohttp_p4 = callPackage ../development/ocaml-modules/cohttp/0.19.3.nix {
base64 = base64_2;
lwt = lwt2;
};
cohttp =
if lib.versionOlder "4.03" ocaml.version
then callPackage ../development/ocaml-modules/cohttp { }
then callPackage ../development/ocaml-modules/cohttp {
base64 = base64_2;
}
else cohttp_p4;
cohttp-lwt = callPackage ../development/ocaml-modules/cohttp/lwt.nix { };
@ -337,7 +342,10 @@ let
then callPackage ../development/tools/ocaml/js_of_ocaml/3.0.nix { }
else js_of_ocaml_2;
js_of_ocaml_2 = callPackage ../development/tools/ocaml/js_of_ocaml { lwt = lwt2; };
js_of_ocaml_2 = callPackage ../development/tools/ocaml/js_of_ocaml {
base64 = base64_2;
lwt = lwt2;
};
js_of_ocaml-camlp4 = callPackage ../development/tools/ocaml/js_of_ocaml/camlp4.nix {};
@ -574,7 +582,10 @@ let
ounit = callPackage ../development/ocaml-modules/ounit { };
piqi = callPackage ../development/ocaml-modules/piqi { };
piqi = callPackage ../development/ocaml-modules/piqi {
base64 = base64_2;
};
piqi-ocaml = callPackage ../development/ocaml-modules/piqi-ocaml { };
ppxfind = callPackage ../development/ocaml-modules/ppxfind { };