From 0748122bd2edbfb5972a85da0bfe12ff3a889b3c Mon Sep 17 00:00:00 2001 From: Jason Conroy Date: Sun, 19 Apr 2026 21:14:02 -0400 Subject: [PATCH] gnu: ocaml: Add ocaml-0install-solver. * gnu/packages/ocaml.scm (ocaml-0install-solver): New variable. Change-Id: I52482474746ea518cd108074b0afe22f62952960 Signed-off-by: Julien Lepiller --- gnu/packages/ocaml.scm | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm index 1e5cee64b50..c1de3ac6eb9 100644 --- a/gnu/packages/ocaml.scm +++ b/gnu/packages/ocaml.scm @@ -992,6 +992,35 @@ https://spdx.github.io/spdx-spec/v2.3/SPDX-license-expressions/ See https://spdx.org/licenses/ for more details.") (license license:expat))) +(define-public ocaml-0install-solver + (package + (name "ocaml-0install-solver") + (version "2.18") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/0install/0install") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "1hm72k355qwgh16hngmnd77bgawf20ipnqxfncdzl10rqrc0640b")))) + (build-system dune-build-system) + (arguments + `(#:package "0install-solver")) + (native-inputs (list ocaml-ounit2)) + (home-page "https://docs.0install.net/developers/solver/") + (synopsis "Package dependency solver") + (description + "This package provides a package dependency resolver based on a SAT solver. +This was originally written for the 0install package manager, but is now +generic and is also used as a solver backend for opam. The SAT solver is +based on @code{MiniSat} (http://minisat.se/Papers.html) and the application to +package management is based on OPIUM (Optimal Package Install/Uninstall +Manager). 0install-solver uses a (novel?) strategy to find the optimal +solution extremely quickly (even for a SAT-based solver).") + (license license:lgpl2.1+))) + (define ocaml-opam-core (package (name "ocaml-opam-core")