diff options
| author | Giacomo Leidi <therewasa@fishinthecalculator.me> | 2026-02-21 01:11:58 +0100 |
|---|---|---|
| committer | jgart <jgart@dismail.de> | 2026-02-23 10:22:56 -0500 |
| commit | 9d0fce8d975b18ad987a485fd7e63378564946dc (patch) | |
| tree | a754f5790def636249f2a16e9fd801c213efd62a | |
| parent | c736f8c15fa0328c879d06b7ee854290a8dc2d92 (diff) | |
gnu: Add guix-compose.
* gnu/packages/containers.scm (guix-compose): New variable.
Change-Id: I0a1270272222b620f1344c096b5f68274581b2fd
Signed-off-by: jgart <jgart@dismail.de>
| -rw-r--r-- | gnu/packages/containers.scm | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/gnu/packages/containers.scm b/gnu/packages/containers.scm index caecb4e5417..18591258ba0 100644 --- a/gnu/packages/containers.scm +++ b/gnu/packages/containers.scm | |||
| @@ -10,6 +10,7 @@ | |||
| 10 | ;;; Copyright © 2024 Jean-Pierre De Jesus DIAZ <jean@foundation.xyz> | 10 | ;;; Copyright © 2024 Jean-Pierre De Jesus DIAZ <jean@foundation.xyz> |
| 11 | ;;; Copyright © 2025 Tomas Volf <~@wolfsden.cz> | 11 | ;;; Copyright © 2025 Tomas Volf <~@wolfsden.cz> |
| 12 | ;;; Copyright © 2025 Foster Hangdaan <foster@hangdaan.email> | 12 | ;;; Copyright © 2025 Foster Hangdaan <foster@hangdaan.email> |
| 13 | ;;; Copyright © 2026 Giacomo Leidi <therewasa@fishinthecalculator.me> | ||
| 13 | ;;; | 14 | ;;; |
| 14 | ;;; This file is part of GNU Guix. | 15 | ;;; This file is part of GNU Guix. |
| 15 | ;;; | 16 | ;;; |
| @@ -37,8 +38,10 @@ | |||
| 37 | #:use-module (guix build-system copy) | 38 | #:use-module (guix build-system copy) |
| 38 | #:use-module (guix build-system gnu) | 39 | #:use-module (guix build-system gnu) |
| 39 | #:use-module (guix build-system go) | 40 | #:use-module (guix build-system go) |
| 41 | #:use-module (guix build-system guile) | ||
| 40 | #:use-module (guix build-system meson) | 42 | #:use-module (guix build-system meson) |
| 41 | #:use-module (guix build-system pyproject) | 43 | #:use-module (guix build-system pyproject) |
| 44 | #:use-module ((guix search-paths) #:select ($GUIX_EXTENSIONS_PATH)) | ||
| 42 | #:use-module (guix utils) | 45 | #:use-module (guix utils) |
| 43 | #:use-module (gnu packages admin) | 46 | #:use-module (gnu packages admin) |
| 44 | #:use-module (gnu packages autotools) | 47 | #:use-module (gnu packages autotools) |
| @@ -58,11 +61,13 @@ | |||
| 58 | #:use-module (gnu packages golang-web) | 61 | #:use-module (gnu packages golang-web) |
| 59 | #:use-module (gnu packages golang-xyz) | 62 | #:use-module (gnu packages golang-xyz) |
| 60 | #:use-module (gnu packages guile) | 63 | #:use-module (gnu packages guile) |
| 64 | #:use-module (gnu packages guile-xyz) | ||
| 61 | #:use-module (gnu packages linux) | 65 | #:use-module (gnu packages linux) |
| 62 | #:use-module (gnu packages man) | 66 | #:use-module (gnu packages man) |
| 63 | #:use-module (gnu packages pcre) | 67 | #:use-module (gnu packages pcre) |
| 64 | #:use-module (gnu packages python) | 68 | #:use-module (gnu packages python) |
| 65 | #:use-module (gnu packages networking) | 69 | #:use-module (gnu packages networking) |
| 70 | #:use-module (gnu packages package-management) | ||
| 66 | #:use-module (gnu packages pkg-config) | 71 | #:use-module (gnu packages pkg-config) |
| 67 | #:use-module (gnu packages python-xyz) | 72 | #:use-module (gnu packages python-xyz) |
| 68 | #:use-module (gnu packages python-build) | 73 | #:use-module (gnu packages python-build) |
| @@ -286,6 +291,68 @@ containers highly integrated with the hosts.") | |||
| 286 | contents, and discovering ways to shrink the size of Docker/OCI image.") | 291 | contents, and discovering ways to shrink the size of Docker/OCI image.") |
| 287 | (license license:expat))) | 292 | (license license:expat))) |
| 288 | 293 | ||
| 294 | (define-public guix-compose | ||
| 295 | (package | ||
| 296 | (name "guix-compose") | ||
| 297 | (version "0.1.1") | ||
| 298 | (source | ||
| 299 | (origin | ||
| 300 | (method git-fetch) | ||
| 301 | (uri (git-reference | ||
| 302 | (url "https://codeberg.org/fishinthecalculator/guix-compose") | ||
| 303 | (commit version))) | ||
| 304 | (file-name (git-file-name name version)) | ||
| 305 | (sha256 | ||
| 306 | (base32 "1ij6rfs5pfykk8c53q029sl2qx3k572dqdfb6pn5s569l6697ci1")))) | ||
| 307 | (build-system guile-build-system) | ||
| 308 | (arguments | ||
| 309 | (list | ||
| 310 | #:source-directory "src" | ||
| 311 | #:phases | ||
| 312 | #~(modify-phases %standard-phases | ||
| 313 | (add-after 'unpack 'set-load-paths-in-entry-point | ||
| 314 | (lambda _ | ||
| 315 | (define load-path | ||
| 316 | (cons (string-append #$output "/share/guile/site/3.0") | ||
| 317 | (parse-path (getenv "GUILE_LOAD_PATH")))) | ||
| 318 | (define load-compiled-path | ||
| 319 | (cons (string-append #$output "/lib/guile/3.0/site-ccache") | ||
| 320 | (parse-path (getenv "GUILE_LOAD_COMPILED_PATH")))) | ||
| 321 | (define search-paths-header | ||
| 322 | `(begin | ||
| 323 | (set! %load-path | ||
| 324 | (append (list ,@load-path) %load-path)) | ||
| 325 | (set! %load-compiled-path | ||
| 326 | (append (list ,@load-compiled-path) | ||
| 327 | %load-compiled-path)))) | ||
| 328 | |||
| 329 | (substitute* "src/guix/extensions/compose.scm" | ||
| 330 | ((";;@load-paths@") | ||
| 331 | (with-output-to-string | ||
| 332 | (lambda () (write search-paths-header))))))) | ||
| 333 | (add-after 'build 'add-extension-to-search-path | ||
| 334 | (lambda _ | ||
| 335 | (with-directory-excursion #$output | ||
| 336 | (mkdir-p "share/guix/extensions") | ||
| 337 | (symlink | ||
| 338 | (string-append | ||
| 339 | #$output "/share/guile/site/3.0/guix/extensions/compose.scm") | ||
| 340 | "share/guix/extensions/compose.scm")))) | ||
| 341 | (add-after 'add-extension-to-search-path 'check | ||
| 342 | (lambda _ | ||
| 343 | (invoke | ||
| 344 | "guile" "-L" "./modules" "-s" "tests/test-compose.scm")))))) | ||
| 345 | (native-inputs (list guile-3.0)) | ||
| 346 | ;; Avoid setting propagated so that we use the user’s profile. | ||
| 347 | (inputs (list guix guile-yamlpp)) | ||
| 348 | (native-search-paths | ||
| 349 | (list $GUIX_EXTENSIONS_PATH)) | ||
| 350 | (synopsis "Guix' docker compose compatibility layer") | ||
| 351 | (description "A toolkit to run, read and write docker-compose.yml files with | ||
| 352 | Guix machinery.") | ||
| 353 | (home-page "https://codeberg.org/fishinthecalculator/guix-compose") | ||
| 354 | (license license:gpl3+))) | ||
| 355 | |||
| 289 | (define-public libslirp | 356 | (define-public libslirp |
| 290 | (package | 357 | (package |
| 291 | (name "libslirp") | 358 | (name "libslirp") |
