nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 buildDunePackage,
4 fetchurl,
5 ocaml,
6 domain-local-await,
7 domain-local-timeout,
8 alcotest,
9 multicore-magic,
10 backoff,
11 domain_shims,
12 mdx,
13}:
14
15buildDunePackage rec {
16 pname = "kcas";
17 version = "0.7.0";
18
19 src = fetchurl {
20 url = "https://github.com/ocaml-multicore/kcas/releases/download/${version}/kcas-${version}.tbz";
21 hash = "sha256-mo/otnkB79QdyVgLw1sZFfkR/Z/l15cRVfEYPPd6H5E=";
22 };
23
24 propagatedBuildInputs = [
25 domain-local-await
26 domain-local-timeout
27 multicore-magic
28 backoff
29 ];
30
31 doCheck = lib.versionAtLeast ocaml.version "5.1" && !lib.versionAtLeast ocaml.version "5.4";
32 nativeCheckInputs = [ mdx.bin ];
33 checkInputs = [
34 alcotest
35 domain_shims
36 mdx
37 ];
38
39 meta = {
40 homepage = "https://github.com/ocaml-multicore/kcas";
41 description = "STM based on lock-free MCAS";
42 longDescription = ''
43 A software transactional memory (STM) implementation based on an atomic lock-free multi-word compare-and-set (MCAS) algorithm enhanced with read-only compare operations and ability to block awaiting for changes.
44 '';
45 changelog = "https://raw.githubusercontent.com/ocaml-multicore/kcas/refs/tags/${version}/CHANGES.md";
46 license = lib.licenses.isc;
47 maintainers = [ lib.maintainers.vbgl ];
48 };
49}