about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/ocaml-modules/psq/default.nix
blob: 08b9c10d982173df94b58301b408d90f7507430a (plain) (blame)
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
{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, topkg }:

if !stdenv.lib.versionAtLeast ocaml.version "4.02"
then throw "psq is not available for OCaml ${ocaml.version}"
else

stdenv.mkDerivation rec {
  name = "ocaml${ocaml.version}-psq-${version}";
  version = "0.1.0";

  src = fetchurl {
    url = "https://github.com/pqwy/psq/releases/download/v${version}/psq-${version}.tbz";
    sha256 = "08ghgdivbjrxnaqc3hsb69mr9s2ql5ds0fb97b7z6zimzqibz6lp";
  };

  buildInputs = [ ocaml findlib ocamlbuild topkg ];

  inherit (topkg) buildPhase installPhase;

  meta = {
    description = "Functional Priority Search Queues for OCaml";
    homepage = "https://github.com/pqwy/psq";
    maintainers = [ stdenv.lib.maintainers.vbgl ];
    license = stdenv.lib.licenses.isc;
    inherit (ocaml.meta) platforms;
  };
}