diff --git a/pkgs/development/ocaml-modules/chacha/default.nix b/pkgs/development/ocaml-modules/chacha/default.nix index 21bae79ab5f8..ebd73b519f95 100644 --- a/pkgs/development/ocaml-modules/chacha/default.nix +++ b/pkgs/development/ocaml-modules/chacha/default.nix @@ -1,6 +1,7 @@ { lib , buildDunePackage -, fetchurl +, fetchFromGitHub +, fetchpatch , ocaml , alcotest @@ -10,16 +11,22 @@ buildDunePackage rec { pname = "chacha"; - version = "1.0.0"; + version = "1.1.0"; - src = fetchurl { - url = "https://github.com/abeaumont/ocaml-chacha/releases/download/${version}/${pname}-${version}.tbz"; - sha256 = "sha256-t8dOMQQDpje0QbuOhjSIa3xnXuXcxMVTLENa/rwdgA4="; + src = fetchFromGitHub { + owner = "abeaumont"; + repo = "ocaml-chacha"; + rev = version; + sha256 = "sha256-PmeiFloU0k3SqOK1VjaliiCEzDzrzyMSasgnO5fJS1k="; }; - useDune2 = true; + # Ensure compatibility with cstruct ≥ 6.1.0 + patches = [ (fetchpatch { + url = "https://github.com/abeaumont/ocaml-chacha/commit/fbe4a0a808226229728a68f278adf370251196fd.patch"; + sha256 = "sha256-y7X9toFDrgdv3qmFmUs7K7QS+Gy45rRLulKy48m7uqc="; + })]; - minimumOCamlVersion = "4.02"; + minimalOCamlVersion = "4.02"; propagatedBuildInputs = [ cstruct mirage-crypto ];