packages/baguette_sharp: use finalAttrs

This commit is contained in:
Primrose 2025-12-31 17:10:53 +01:00
parent 1ba9742e6d
commit e6b92df151
Signed by: primrose
GPG key ID: 4E887A4CA9714ADA

View file

@ -2,10 +2,9 @@
lib, lib,
fetchFromGitHub, fetchFromGitHub,
fetchpatch, fetchpatch,
ocaml,
ocamlPackages, ocamlPackages,
}: }:
ocamlPackages.buildDunePackage rec { ocamlPackages.buildDunePackage (finalAttrs: {
pname = "baguette_sharp"; pname = "baguette_sharp";
version = "2.3.0"; version = "2.3.0";
@ -15,7 +14,7 @@ ocamlPackages.buildDunePackage rec {
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "vanilla-extracts"; owner = "vanilla-extracts";
repo = "ocaml-baguettesharp-interpreter"; repo = "ocaml-baguettesharp-interpreter";
rev = "v${version}"; rev = "v${finalAttrs.version}";
hash = "sha256-GI60O6om71P3L+fGHGBCZ+U8vMlwPgYTWZCSCnEM0Wc="; hash = "sha256-GI60O6om71P3L+fGHGBCZ+U8vMlwPgYTWZCSCnEM0Wc=";
}; };
@ -23,10 +22,9 @@ ocamlPackages.buildDunePackage rec {
fmt fmt
linenoise linenoise
]; ];
doCheck = lib.versionAtLeast ocaml.version "4.13.1";
patches = [ patches = [
(fetchpatch { (fetchpatch {
name = "fix dune"; name = "dune-fix";
url = "https://github.com/vanilla-extracts/ocaml-baguettesharp-interpreter/commit/8809bc39a5e2cb02f757636f9939dc7818876779.patch"; url = "https://github.com/vanilla-extracts/ocaml-baguettesharp-interpreter/commit/8809bc39a5e2cb02f757636f9939dc7818876779.patch";
hash = "sha256-j0C2T3ZZ3K2Xvvl0qH5zl0znTkiUR8PO9FlqqPUX2aw="; hash = "sha256-j0C2T3ZZ3K2Xvvl0qH5zl0znTkiUR8PO9FlqqPUX2aw=";
}) })
@ -36,5 +34,6 @@ ocamlPackages.buildDunePackage rec {
homepage = "https://github.com/vanilla-extracts/ocaml-baguettesharp-interpreter"; homepage = "https://github.com/vanilla-extracts/ocaml-baguettesharp-interpreter";
description = "OCaml Implementation of the (famous) Baguette# exotic language, used as TIPE for the 2022,2023 seasons concours"; description = "OCaml Implementation of the (famous) Baguette# exotic language, used as TIPE for the 2022,2023 seasons concours";
license = lib.licenses.gpl3Plus; license = lib.licenses.gpl3Plus;
mainProgram = "baguette_sharp.repl";
}; };
} })