From: Amélia Coutard-Sander Date: Sat, 20 Sep 2025 09:35:49 +0000 (+0200) Subject: Correction du paquet guix X-Git-Url: https://git.ameliathe1st.gay/?a=commitdiff_plain;h=0036a2ab518e302d75cb7bc88edb2a8ad946c885;p=site-web.git Correction du paquet guix --- diff --git a/Makefile b/Makefile index bf61492..0d261ce 100644 --- a/Makefile +++ b/Makefile @@ -1,8 +1,9 @@ .PHONY: build clean -ESH=$(patsubst html/%.ml,out/%,$(shell find html -name '*.ml')) -STATIC=$(patsubst html/%,out/%,$(shell find html -type f -and -not -name '*.ml')) -DOCS=$(patsubst %,out/docs/%,$(shell ocaml docs/meta.ml print-doc-files)) +ESH:=$(patsubst html/%.ml,out/%,$(shell find html -name '*.ml')) +STATIC:=$(patsubst html/%,out/%,$(shell find html -type f -and -not -name '*.ml')) +DOCS:=$(patsubst %,out/docs/%,$(shell ocaml docs/meta.ml print-doc-files)) +OCAMLFLAGS:=$(OCAMLFLAGS) build: $(ESH) $(STATIC) $(DOCS) clean: @@ -23,7 +24,7 @@ out/%: html/% cp "$<" "$@" out/%: html/%.ml mkdir -p "$(@D)" - cd html; ocaml "$*.ml" > "../$@" + cd html; ocaml $(OCAMLFLAGS) "$*.ml" > "../$@" # Deps diff --git a/guix/site-web.scm b/guix/site-web.scm index aec9af5..f8cfac6 100644 --- a/guix/site-web.scm +++ b/guix/site-web.scm @@ -12,12 +12,16 @@ ; not, see . (define-module (site-web) + #:use-module (gnu packages base) #:use-module (gnu packages databases) #:use-module (gnu packages fontutils) #:use-module (gnu packages music) #:use-module (gnu packages ocaml) + #:use-module (gnu packages version-control) #:use-module (gnu packages web) + #:use-module (guix build-system dune) #:use-module (guix build-system gnu) + #:use-module (guix build-system ocaml) #:use-module (guix download) #:use-module (guix gexp) #:use-module (guix git-download) @@ -27,13 +31,142 @@ #:use-module (guix utils) #:export (site-web)) +(define-public ocaml-merlin-extend + (package + (name "ocaml-merlin-extend") + (version "0.6.2") + (source + (origin + (method url-fetch) + (uri + "https://github.com/let-def/merlin-extend/releases/download/v0.6.2/merlin-extend-0.6.2.tbz") + (sha256 + (base32 "0yfpyjqf0j3qmnv5490ksnhcyfhkhzvvfby8p7r64i5n61zqwma7")))) + (build-system dune-build-system) + (native-inputs (list ocaml-cppo)) + (home-page "https://github.com/let-def/merlin-extend") + (synopsis "A protocol to provide custom frontend to Merlin") + (description + "This protocol allows to replace the OCaml frontend of Merlin. It extends what +used to be done with the `-pp flag to handle a few more cases.") + (license license:expat))) + +(define-public ocaml-reason + (package + (name "ocaml-reason") + (version "3.17.0") + (source + (origin + (method url-fetch) + (uri + "https://github.com/reasonml/reason/releases/download/3.17.0/reason-3.17.0.tbz") + (sha256 + (base32 "1sx5z269sry2xbca3d9sw7mh9ag773k02r9cgrz5n8gxx6f83j42")))) + (build-system dune-build-system) + (propagated-inputs (list ocaml-cmdliner + ocaml-dune-build-info + ocaml-menhir + ocaml-merlin-extend + ocaml-fix + ocaml-cppo + ocaml-ppxlib + ocaml-odoc + ocaml-utop)) + (native-inputs (list ocaml-findlib git)) + (home-page "https://reasonml.github.io/") + (synopsis "Reason: Syntax & Toolchain for OCaml") + (description + "Reason gives OCaml a new syntax that is remniscient of languages like +@code{JavaScript}. It's also the umbrella project for a set of tools for the +OCaml & @code{JavaScript} ecosystem.") + (license license:expat))) + +(define-public ocaml-tyxml-syntax + (package + (name "ocaml-tyxml-syntax") + (version "4.6.0") + (source + (origin + (method url-fetch) + (uri + "https://github.com/ocsigen/tyxml/releases/download/4.6.0/tyxml-4.6.0.tbz") + (sha256 + (base32 "1p82r68lxk6wzxihzd620a6kzp27vn548j2cr970l4jfdcy6gsxz")))) + (build-system dune-build-system) + (propagated-inputs (list ocaml-ppxlib ocaml-re ocaml-uutf ocaml-odoc)) + (arguments `(#:package "tyxml-syntax")) + (native-inputs (list ocaml-alcotest)) + (home-page "https://github.com/ocsigen/tyxml") + (synopsis "Common layer for the JSX and PPX syntaxes for Tyxml") + (description #f) + (license #f))) + +(define-public ocaml-tyxml-ppx + (package + (name "ocaml-tyxml-ppx") + (version "4.6.0") + (source + (origin + (method url-fetch) + (uri + "https://github.com/ocsigen/tyxml/releases/download/4.6.0/tyxml-4.6.0.tbz") + (sha256 + (base32 "1p82r68lxk6wzxihzd620a6kzp27vn548j2cr970l4jfdcy6gsxz")))) + (build-system dune-build-system) + (propagated-inputs (list ocaml-tyxml ocaml-tyxml-syntax ocaml-markup + ocaml-ppxlib ocaml-odoc)) + (arguments `(#:package "tyxml-ppx" #:tests? #f)) + (native-inputs (list ocaml-alcotest)) + (home-page "https://github.com/ocsigen/tyxml") + (synopsis "PPX to write TyXML documents with the HTML syntax") + (description + "```ocaml open Tyxml let%html to_ocaml = \"OCaml!\" ``` The +@code{TyXML} PPX allow to write @code{TyXML} documents using the traditional +HTML syntax. It works with textual trees, virtual DOM trees, or any +@code{TyXML} module.") + (license #f))) + +(define-public ocamlnet + (package + (name "ocamlnet") + (version "4.1.9-2") + (source + (origin + (method url-fetch) + (uri + "https://github.com/ocaml/opam-source-archives/raw/main/ocamlnet-4.1.9.tar.gz") + (sha256 + (base32 "1vlwxjxr946gdl61a1d7yk859cijq45f60dhn54ik3w4g6cx33pr")))) + (build-system ocaml-build-system) + (arguments + (list #:tests? #f) + ) + (inputs (list which)) + (native-inputs (list ocamlbuild)) + (home-page "http://projects.camlcity.org/projects/ocamlnet.html") + (synopsis + "Internet protocols (HTTP, CGI, e-mail etc.) and helper data structures") + (description + "(mail messages, character sets, etc.) Ocamlnet is an enhanced system platform +library for Ocaml. As the name suggests, large parts of it have to do with +network programming, but it is actually not restricted to this. Other parts +deal with the management of multiple worker processes, and the interaction with +other programs running on the same machine. You can also view Ocamlnet as an +extension of the system interface as provided by the Unix module of the standard +library.") + (license #f))) + +(define vcs-file? + (or (git-predicate (dirname (current-source-directory))) + (const #t))) + (define site-web (package (name "site-web") (version "1.0-git") - (source (local-file ".." "site-web-checkout" #:recursive? #t)) + (source (local-file ".." "site-web-checkout" #:recursive? #t #:select? vcs-file?)) (build-system gnu-build-system) - (inputs (list fontforge jq lilypond recutils ocaml ocaml-tyxml)) + (inputs (list fontforge jq lilypond recutils ocaml ocaml-findlib ocaml-re ocaml-tyxml ocaml-uutf ocaml-tyxml-ppx ocamlnet)) (arguments (list #:phases #~(modify-phases %standard-phases @@ -42,7 +175,8 @@ (replace 'install (lambda* (#:key output #:allow-other-keys) (mkdir-p (string-append #$output "/share/")) - (invoke "cp" "-r" "out" (string-append #$output "/share/site-web"))))))) + (invoke "cp" "-r" "out" (string-append #$output "/share/site-web"))))) + #:make-flags #~(list (string-append "OCAMLFLAGS=-I " #$ocaml-findlib "/lib/ocaml/site-lib")))) (synopsis "Mon site web") (description "Mon site web statique, implémenté en OCaml.") (home-page "https://www.ameliathe1st.gay")