ocamlPackages.lru: 0.2.0 → 0.3.0

ocamlPackages.psq: 0.1.0 → 0.2.0
This commit is contained in:
Vincent Laporte 2019-10-08 19:54:25 +00:00 committed by Vincent Laporte
parent fce8b4837a
commit 8dd417eed6
2 changed files with 18 additions and 29 deletions

View file

@ -1,25 +1,20 @@
{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, topkg, psq }: { lib, fetchurl, buildDunePackage, psq }:
stdenv.mkDerivation rec { buildDunePackage rec {
name = "ocaml${ocaml.version}-lru-${version}"; pname = "lru";
version = "0.2.0"; version = "0.3.0";
src = fetchurl { src = fetchurl {
url = "https://github.com/pqwy/lru/releases/download/v${version}/lru-${version}.tbz"; url = "https://github.com/pqwy/lru/releases/download/v${version}/lru-v${version}.tbz";
sha256 = "0bd7js9rrma1fjjjjc3fgr9l5fjbhgihx2nsaf96g2b35iiaimd0"; sha256 = "1ab9rd7cq15ml8x0wjl44wy99h5z7x4g9vkkz4i2d7n84ghy7vw4";
}; };
buildInputs = [ ocaml findlib ocamlbuild topkg ];
propagatedBuildInputs = [ psq ]; propagatedBuildInputs = [ psq ];
inherit (topkg) buildPhase installPhase;
meta = { meta = {
homepage = "https://github.com/pqwy/lru"; homepage = "https://github.com/pqwy/lru";
description = "Scalable LRU caches for OCaml"; description = "Scalable LRU caches for OCaml";
maintainers = [ stdenv.lib.maintainers.vbgl ]; maintainers = [ lib.maintainers.vbgl ];
license = stdenv.lib.licenses.isc; license = lib.licenses.isc;
inherit (ocaml.meta) platforms;
}; };
} }

View file

@ -1,27 +1,21 @@
{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, topkg }: { lib, buildDunePackage, fetchurl, seq }:
if !stdenv.lib.versionAtLeast ocaml.version "4.02" buildDunePackage rec {
then throw "psq is not available for OCaml ${ocaml.version}" minimumOCamlVersion = "4.03";
else pname = "psq";
version = "0.2.0";
stdenv.mkDerivation rec {
name = "ocaml${ocaml.version}-psq-${version}";
version = "0.1.0";
src = fetchurl { src = fetchurl {
url = "https://github.com/pqwy/psq/releases/download/v${version}/psq-${version}.tbz"; url = "https://github.com/pqwy/psq/releases/download/v${version}/psq-v${version}.tbz";
sha256 = "08ghgdivbjrxnaqc3hsb69mr9s2ql5ds0fb97b7z6zimzqibz6lp"; sha256 = "1j4lqkq17rskhgcrpgr4n1m1a2b1x35mlxj6f9g05rhpmgvgvknk";
}; };
buildInputs = [ ocaml findlib ocamlbuild topkg ]; propagatedBuildInputs = [ seq ];
inherit (topkg) buildPhase installPhase;
meta = { meta = {
description = "Functional Priority Search Queues for OCaml"; description = "Functional Priority Search Queues for OCaml";
homepage = "https://github.com/pqwy/psq"; homepage = "https://github.com/pqwy/psq";
maintainers = [ stdenv.lib.maintainers.vbgl ]; maintainers = [ lib.maintainers.vbgl ];
license = stdenv.lib.licenses.isc; license = lib.licenses.isc;
inherit (ocaml.meta) platforms;
}; };
} }