diff options
author | Vincent Laporte <Vincent.Laporte@gmail.com> | 2021-12-16 10:37:15 +0100 |
---|---|---|
committer | Vincent Laporte <vbgl@users.noreply.github.com> | 2021-12-23 13:09:35 +0100 |
commit | 6a6c2992d4abf768b8b29c41317dc7db7439cf34 (patch) | |
tree | 8de9ee30e14cab82792eb2f29309a30fa5034b80 | |
parent | 56c2f8f1cc41244275911aceb43b9ca4d33b82ef (diff) | |
download | nixpkgs-6a6c2992d4abf768b8b29c41317dc7db7439cf34.tar nixpkgs-6a6c2992d4abf768b8b29c41317dc7db7439cf34.tar.gz nixpkgs-6a6c2992d4abf768b8b29c41317dc7db7439cf34.tar.bz2 nixpkgs-6a6c2992d4abf768b8b29c41317dc7db7439cf34.tar.lz nixpkgs-6a6c2992d4abf768b8b29c41317dc7db7439cf34.tar.xz nixpkgs-6a6c2992d4abf768b8b29c41317dc7db7439cf34.tar.zst nixpkgs-6a6c2992d4abf768b8b29c41317dc7db7439cf34.zip |
ocamlPackages.batteries: 3.3.0 → 3.4.0
-rw-r--r-- | pkgs/development/ocaml-modules/batteries/default.nix | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/pkgs/development/ocaml-modules/batteries/default.nix b/pkgs/development/ocaml-modules/batteries/default.nix index b88b7c59956..d2edb69e1b9 100644 --- a/pkgs/development/ocaml-modules/batteries/default.nix +++ b/pkgs/development/ocaml-modules/batteries/default.nix @@ -1,15 +1,21 @@ -{ stdenv, lib, fetchurl, ocaml, findlib, ocamlbuild, qtest, num +{ stdenv, lib, fetchFromGitHub, ocaml, findlib, ocamlbuild, qtest, num , doCheck ? lib.versionAtLeast ocaml.version "4.08" && !stdenv.isAarch64 }: -let version = "3.3.0"; in +if !lib.versionAtLeast ocaml.version "4.02" +then throw "batteries is not available for OCaml ${ocaml.version}" +else + +let version = "3.4.0"; in stdenv.mkDerivation { name = "ocaml${ocaml.version}-batteries-${version}"; - src = fetchurl { - url = "https://github.com/ocaml-batteries-team/batteries-included/releases/download/v${version}/batteries-${version}.tar.gz"; - sha256 = "002pqkcg18zx59hsf172wg6s7lwsiagp5sfvf5yssp7xxal5jdgx"; + src = fetchFromGitHub { + owner = "ocaml-batteries-team"; + repo = "batteries-included"; + rev = "v${version}"; + sha256 = "sha256:1cd7475n1mxhq482aidmhh27mq5p2vmb8d9fkb1mlza9pz5z66yq"; }; buildInputs = [ ocaml findlib ocamlbuild ]; @@ -30,7 +36,7 @@ stdenv.mkDerivation { language. ''; license = lib.licenses.lgpl21Plus; - platforms = ocaml.meta.platforms or []; + inherit (ocaml.meta) platforms; maintainers = [ lib.maintainers.maggesi ]; |