Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib, stdenv, fetchurl, ocaml, findlib, ocamlbuild, topkg, cmdliner }:
2
3lib.throwIfNot (lib.versionAtLeast ocaml.version "4.08")
4 "uuidm is not available for OCaml ${ocaml.version}"
5
6stdenv.mkDerivation rec {
7 version = "0.9.8";
8 pname = "uuidm";
9 src = fetchurl {
10 url = "https://erratique.ch/software/uuidm/releases/uuidm-${version}.tbz";
11 sha256 = "sha256-/GZbkJVDQu1UY8SliK282kUWAVMfOnpQadUlRT/tJrM=";
12 };
13
14 postPatch = ''
15 substituteInPlace pkg/META --replace "bytes" ""
16 '';
17
18 strictDeps = true;
19
20 nativeBuildInputs = [ ocaml findlib ocamlbuild topkg ];
21 configurePlatforms = [];
22 buildInputs = [ topkg cmdliner ];
23
24 inherit (topkg) buildPhase installPhase;
25
26 meta = with lib; {
27 description = "An OCaml module implementing 128 bits universally unique identifiers version 3, 5 (name based with MD5, SHA-1 hashing) and 4 (random based) according to RFC 4122";
28 homepage = "https://erratique.ch/software/uuidm";
29 license = licenses.bsd3;
30 maintainers = [ maintainers.maurer ];
31 mainProgram = "uuidtrip";
32 inherit (ocaml.meta) platforms;
33 };
34}