From b952554a81d842392bbfdca2ddf0164b9b0794c4 Mon Sep 17 00:00:00 2001 From: Fernando Rodrigues Date: Wed, 3 Jul 2024 01:05:09 +0000 Subject: [PATCH] ocamlPackages.xenstore: drop cstruct dependency Also begins fetching sources from git, instead of the release. Signed-off-by: Fernando Rodrigues --- .../ocaml-modules/xenstore/default.nix | 27 +++++++++++-------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/pkgs/development/ocaml-modules/xenstore/default.nix b/pkgs/development/ocaml-modules/xenstore/default.nix index acbf1c270ffa..296597a6a629 100644 --- a/pkgs/development/ocaml-modules/xenstore/default.nix +++ b/pkgs/development/ocaml-modules/xenstore/default.nix @@ -1,21 +1,23 @@ -{ lib, buildDunePackage, fetchurl -, cstruct, ppx_cstruct, lwt, ounit2 +{ + lib, + buildDunePackage, + fetchFromGitHub, + lwt, + ounit2, }: buildDunePackage rec { pname = "xenstore"; version = "2.3.0"; - minimalOCamlVersion = "4.08"; - duneVersion = "3"; - - src = fetchurl { - url = "https://github.com/mirage/ocaml-xenstore/releases/download/v${version}/xenstore-${version}.tbz"; - hash = "sha256-1jxrvLLTwpd2fYPAoPbdRs7P1OaR8c9cW2VURF7Bs/Q="; + src = fetchFromGitHub { + owner = "mirage"; + repo = "ocaml-xenstore"; + rev = "v${version}"; + hash = "sha256-LaynsbCE/+2QfbQCOLZi8nw1rqmZtgrwAov9cSxYZw8="; }; - buildInputs = [ ppx_cstruct ]; - propagatedBuildInputs = [ cstruct lwt ]; + propagatedBuildInputs = [ lwt ]; doCheck = true; checkInputs = [ ounit2 ]; @@ -23,7 +25,10 @@ buildDunePackage rec { meta = with lib; { description = "Xenstore protocol in pure OCaml"; license = licenses.lgpl21Only; - maintainers = [ maintainers.sternenseemann ]; + maintainers = with maintainers; [ + sternenseemann + sigmasquadron + ]; homepage = "https://github.com/mirage/ocaml-xenstore"; }; }