aboutsummaryrefslogtreecommitdiff
path: root/infra/libkookie/nixpkgs/pkgs/development/ocaml-modules/base64/default.nix
blob: b2e3e0c5e74d359a2e8ed3e0c53db47f3e0d9764 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
{ lib, fetchpatch, fetchzip, buildDunePackage, alcotest, bos }:

let version = "3.2.0"; in

buildDunePackage rec {
  pname = "base64";
  inherit version;

  src = fetchzip {
    url = "https://github.com/mirage/ocaml-base64/archive/v${version}.tar.gz";
    sha256 = "1ilw3zj0w6cq7i4pvr8m2kv5l5f2y9aldmv72drlwwns013b1gwy";
  };

  minimumOCamlVersion = "4.03";

  buildInputs = [ bos ];

  # Fix test-suite for alcotest ≥ 1.0
  patches = [(fetchpatch {
    url = "https://github.com/mirage/ocaml-base64/commit/8d334d02aa52875158fae3e2fb8fe0a5596598d0.patch";
    sha256 = "0lvqdp98qavpzis1wgwh3ijajq79hq47898gsrk37fpyjbrdzf5q";
  })];

  doCheck = true;
  checkInputs = [ alcotest ];

  meta = {
    homepage = "https://github.com/mirage/ocaml-base64";
    description = "Base64 encoding and decoding in OCaml";
    license = lib.licenses.isc;
    maintainers = with lib.maintainers; [ vbgl ];
  };
}