Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / ocaml-modules / uuidm / default.nix
blob949737d28ee07183b40d9ec1dc5400462e65ecb9
1 { lib, stdenv, fetchurl, ocaml, findlib, ocamlbuild, topkg, cmdliner }:
3 lib.throwIfNot (lib.versionAtLeast ocaml.version "4.08")
4   "uuidm is not available for OCaml ${ocaml.version}"
6 stdenv.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   };
14   postPatch = ''
15     substituteInPlace pkg/META --replace "bytes" ""
16   '';
18   strictDeps = true;
20   nativeBuildInputs = [ ocaml findlib ocamlbuild topkg ];
21   configurePlatforms = [];
22   buildInputs = [ topkg cmdliner ];
24   inherit (topkg) buildPhase installPhase;
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   };