forgejo-lts: 7.0.10 -> 7.0.11
[NixPkgs.git] / pkgs / development / ocaml-modules / uuidm / default.nix
blobcf354c5e898d488bcea6b36b7ec509141ffbdce7
1 { lib, stdenv, fetchurl, ocaml, findlib, ocamlbuild, topkg, cmdliner
2 , version ? if lib.versionAtLeast ocaml.version "4.14" then "0.9.9" else "0.9.8"
3 }:
5 lib.throwIfNot (lib.versionAtLeast ocaml.version "4.08")
6   "uuidm is not available for OCaml ${ocaml.version}"
8 stdenv.mkDerivation {
9   inherit version;
10   pname = "uuidm";
11   src = fetchurl {
12     url = "https://erratique.ch/software/uuidm/releases/uuidm-${version}.tbz";
13     hash = {
14       "0.9.9" = "sha256-jOgNF05dpoU/XQEefSZhn3zSlQ1BA1b/U4Ib9j2mvFo=";
15       "0.9.8" = "sha256-/GZbkJVDQu1UY8SliK282kUWAVMfOnpQadUlRT/tJrM=";
16     }."${version}";
17   };
19   strictDeps = true;
21   nativeBuildInputs = [ ocaml findlib ocamlbuild topkg ];
22   configurePlatforms = [];
23   buildInputs = [ topkg cmdliner ];
25   inherit (topkg) buildPhase installPhase;
27   meta = with lib; {
28     description = "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";
29     homepage = "https://erratique.ch/software/uuidm";
30     license = licenses.bsd3;
31     maintainers = [ maintainers.maurer ];
32     mainProgram = "uuidtrip";
33     inherit (ocaml.meta) platforms;
34   };