From c527642f3caecd81a8ec71f3394d58da963ac0e2 Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Tue, 25 Nov 2025 20:43:03 +0100 Subject: [PATCH] =?UTF-8?q?ocamlPackages.repr:=200.7.0=20=E2=86=92=200.8.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ocaml-modules/repr/default.nix | 32 +++++++++++-------- pkgs/development/ocaml-modules/repr/ppx.nix | 12 ------- 2 files changed, 19 insertions(+), 25 deletions(-) diff --git a/pkgs/development/ocaml-modules/repr/default.nix b/pkgs/development/ocaml-modules/repr/default.nix index ba9a0fc85729..737145017ac0 100644 --- a/pkgs/development/ocaml-modules/repr/default.nix +++ b/pkgs/development/ocaml-modules/repr/default.nix @@ -1,28 +1,34 @@ { lib, buildDunePackage, - fetchFromGitHub, + fetchurl, base64, either, fmt, jsonm, uutf, optint, + # This version constraint strictly applies only to ppx_repr, + # but is enforced here to get a consistent package set + # (with repr and ppx_repr at the same version) + ppxlib, + version ? if lib.versionAtLeast ppxlib.version "0.36" then "0.8.0" else "0.7.0", }: -buildDunePackage rec { +buildDunePackage { pname = "repr"; - version = "0.7.0"; + inherit version; - src = fetchFromGitHub { - owner = "mirage"; - repo = "repr"; - rev = version; - hash = "sha256-SM55m5NIaQ2UKAtznNFSt3LN4QA7As0DyTxVeQjOTjI="; + src = fetchurl { + url = "https://github.com/mirage/repr/releases/download/${version}/repr-${version}.tbz"; + hash = + { + "0.8.0" = "sha256-FyhCO4sCCPmwMq0+Bd2WpDuSzXZBb5FG45TwsLoTM0c="; + "0.7.0" = "sha256-itrJ/oW/ig4g7raBDXIW6Y4bf02b05nmG7ECSs4lAaw="; + } + ."${version}"; }; - minimalOCamlVersion = "4.08"; - propagatedBuildInputs = [ base64 either @@ -32,10 +38,10 @@ buildDunePackage rec { optint ]; - meta = with lib; { + meta = { description = "Dynamic type representations. Provides no stability guarantee"; homepage = "https://github.com/mirage/repr"; - license = licenses.isc; - maintainers = with maintainers; [ sternenseemann ]; + license = lib.licenses.isc; + maintainers = with lib.maintainers; [ sternenseemann ]; }; } diff --git a/pkgs/development/ocaml-modules/repr/ppx.nix b/pkgs/development/ocaml-modules/repr/ppx.nix index 8b1ee472d4e2..d645918c9de8 100644 --- a/pkgs/development/ocaml-modules/repr/ppx.nix +++ b/pkgs/development/ocaml-modules/repr/ppx.nix @@ -1,7 +1,6 @@ { lib, buildDunePackage, - fetchpatch, ppx_deriving, ppxlib, repr, @@ -14,17 +13,6 @@ buildDunePackage { inherit (repr) src version; - patches = lib.optionals (lib.versionAtLeast ppxlib.version "0.36") [ - (fetchpatch { - url = "https://github.com/mirage/repr/commit/460fc85a2804e3301bfc0e79413f5df472d95374.patch"; - hash = "sha256-8nEPyeZ1s9Q/6+BKtdMb9kVhTfCdMmRrU3xpvizVZHA="; - }) - (fetchpatch { - url = "https://github.com/mirage/repr/commit/c939a7317e126589bd6d6bd1d9e38cff749bcdb1.patch"; - hash = "sha256-Srf5fZoc0iiJEZiW8PnIM5VdHOGofbdkhfnjQvFcTq0="; - }) - ]; - propagatedBuildInputs = [ ppx_deriving ppxlib