From patchwork Mon Oct 28 21:28:55 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sharlatan Hellseher X-Patchwork-Id: 69601 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 0643527BBE9; Mon, 28 Oct 2024 21:31:33 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-6.6 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,MAILING_LIST_MULTI, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL, RCVD_IN_VALIDITY_SAFE,SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 0E34227BBE2 for ; Mon, 28 Oct 2024 21:31:32 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t5XKR-0007bB-TK; Mon, 28 Oct 2024 17:31:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t5XKL-0007aI-4F for guix-patches@gnu.org; Mon, 28 Oct 2024 17:31:05 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t5XKK-0005vA-M5 for guix-patches@gnu.org; Mon, 28 Oct 2024 17:31:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=5Ko5tgYkLKbNcn1nx8Skq3EjwphRVdvy61TUNqifbQY=; b=mT5IMGjsS+na7Y7jl9xmdEOv7F1w1Y3K9opj3xLlvO2LbQhHh/BAoyxAwk4cVz7HvHG2R/0O11qiQEdBQK70S5+bfPc0ibhqG9VyWHrnYg5Oegig5sw1QwU2ZK9dDcSZLAhn/pAfCxtFYzJI5JCwSW44PTw+SRhS5CVQ8CYAHkveoJcnaFTiCkWzT7RHd2+wAd8x/rFEbzaf6SjOQStkYKbK++WBHfZVuQ76Ds1bZRiYSQEFlD60NTcySPDI0aNORZM7NYQG2uUeEn5rmIaY/zsWDg78wGkowW4hO2/8zXv7wJY3sOo0oRG7wxcE5ahSVYNCaJqyUOVEeQS+W7lXLA==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1t5XKK-0005y6-FH; Mon, 28 Oct 2024 17:31:04 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#73839] [PATCH v3 1/5] gnu: Add cl-posix-shm. Resent-From: Sharlatan Hellseher Original-Sender: "Debbugs-submit" Resent-CC: glv@posteo.net, cox.katherine.e+guix@gmail.com, me@bonfacemunyoki.com, sharlatanus@gmail.com, jgart@dismail.de, guix-patches@gnu.org Resent-Date: Mon, 28 Oct 2024 21:31:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73839 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 73839@debbugs.gnu.org Cc: Sharlatan Hellseher , Grigory Shepelev , Guillaume Le Vaillant , Katherine Cox-Buday , Munyoki Kilyungi , Sharlatan Hellseher , jgart X-Debbugs-Original-Xcc: Guillaume Le Vaillant , Katherine Cox-Buday , Munyoki Kilyungi , Sharlatan Hellseher , jgart Received: via spool by 73839-submit@debbugs.gnu.org id=B73839.173015101322480 (code B ref 73839); Mon, 28 Oct 2024 21:31:04 +0000 Received: (at 73839) by debbugs.gnu.org; 28 Oct 2024 21:30:13 +0000 Received: from localhost ([127.0.0.1]:54906 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t5XJU-0005qH-Sj for submit@debbugs.gnu.org; Mon, 28 Oct 2024 17:30:13 -0400 Received: from mail-wm1-f50.google.com ([209.85.128.50]:45081) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t5XJQ-0005nn-8X for 73839@debbugs.gnu.org; Mon, 28 Oct 2024 17:30:08 -0400 Received: by mail-wm1-f50.google.com with SMTP id 5b1f17b1804b1-43161e7bb25so46229075e9.2 for <73839@debbugs.gnu.org>; Mon, 28 Oct 2024 14:30:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1730150942; x=1730755742; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=5Ko5tgYkLKbNcn1nx8Skq3EjwphRVdvy61TUNqifbQY=; b=nLg7omYkGzwHlOY3B54cq1jLpYT9rgkLBYPdLQqsrI2XQcH5GHATDC/PRx6/EsdKLP UCrdkxlxx11KgqEWZE9reudaXR2N5THReaqxh7Q1SC3dgo90y2SKHGqv9Wc60nPoj2+d EhCcuuki4eGIgbVOBDHKEX51IAjP7C29C6bWCziIfKFuJRttA2/R9spf4TJO6B0ifSAb jHL2Hj8qBOBc94XPYiyXDubuM3nuob6U3ULnil5l/Q4hAgn02qYkIsGz/4OZpBzSInxi Ria5aNGH0UkpQwNJR1wIvCT2gJwYX7SVjXHqwWPBwsoisr8ZQafUgNl5zajjAuQT/L/8 OaQA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730150942; x=1730755742; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=5Ko5tgYkLKbNcn1nx8Skq3EjwphRVdvy61TUNqifbQY=; b=Doq4dCTcaTjHoKBwf4bvARDs9EtV7NswCF91NLQvbim0JLxY2aZfwxth8qA0JNxrDc AHEpCxTBDPH/+vP2BpV28iOzqvroycLMO8d/vuujsW5+jKkFFbkzj3lQJSeEH2DGgubJ KIKpWGNXCy4WBDBp7HlMvxL0QYRhHF/tU6oc8sqBfUc5DddM70Ial5vkTqcoXdeuig2k 9wscTvnKp021bS/zRfb5SfBaA8dK3kRh/85rP7luPc9GkS8buRplSiX0vgirkluzwVmQ TzLZDBRbPBKkzDYf+5QLnwwMBv6HBd8tP3WW9hWP3VQlF3ssNqJnv0UE9c2ysRipgFOM tX9g== X-Gm-Message-State: AOJu0YwHyLwXsUi5rDNG4Dzt4gLW2k6avNuonljZjpW/t8UYQe+4PfdC t4HbYjKrnncJjZcq/duLqV9kB3okJFBAhLu00xhE6KCl3AbMFXq5LU5esdHY X-Google-Smtp-Source: AGHT+IE+/+AHWjVj/coS0Md9EoKEzbPhtVBmgRnq9ABhJeoO++k7FgDMUzp2kHkFQRsvGu6PdxUGfg== X-Received: by 2002:a05:600c:4708:b0:431:5187:28dd with SMTP id 5b1f17b1804b1-4319ad0c2ddmr79676185e9.28.1730150942462; Mon, 28 Oct 2024 14:29:02 -0700 (PDT) Received: from guxtil.incerto.xyz (cpc100684-bagu15-2-0-cust967.1-3.cable.virginm.net. [86.8.111.200]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38058b13246sm10583480f8f.11.2024.10.28.14.29.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Oct 2024 14:29:02 -0700 (PDT) From: Sharlatan Hellseher Date: Mon, 28 Oct 2024 21:28:55 +0000 Message-ID: <9de791b66a21303bf55d7cadcde5945bba79827b.1730150632.git.sharlatanus@gmail.com> X-Mailer: git-send-email 2.46.0 In-Reply-To: References: MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches From: Grigory Shepelev * gnu/packages/lisp-xyz.scm (cl-posix-shm, ecl-posix-shm, sbcl-shm): New variables. Change-Id: I5ac9a3751977bf98d817acd8b98d1a2ad9d393f7 Co-authored-by: Sharlatan Hellseher --- gnu/packages/lisp-xyz.scm | 75 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) diff --git a/gnu/packages/lisp-xyz.scm b/gnu/packages/lisp-xyz.scm index d93c67ca5d..429541e377 100644 --- a/gnu/packages/lisp-xyz.scm +++ b/gnu/packages/lisp-xyz.scm @@ -30217,6 +30217,81 @@ (define-public cl-trivial-raw-io (define-public ecl-trivial-raw-io (sbcl-package->ecl-package sbcl-trivial-raw-io)) +(define-public sbcl-posix-shm + (package + (name "sbcl-posix-shm") + (version "0.0.7") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://git.sr.ht/~shunter/posix-shm") + (commit (string-append "v" version)))) + (file-name (git-file-name "posix-shm" version)) + (sha256 + (base32 "1lk8sach64zgj81988q3z8i153gi3dkda3fkb11cxgsmymawddk9")))) + (build-system asdf-build-system/sbcl) + (arguments + (list + #:asd-systems ''("posix-shm" "posix-shm/ffi" "posix-shm/test") + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'fix-paths + (lambda* (#:key inputs #:allow-other-keys) + (substitute* "ffi/ffi.lisp" + (("libc.so.6") + (search-input-file inputs "/lib/libc.so.6")) + (("librt.so.1") + (search-input-file inputs "/lib/librt.so.1")))))))) + (native-inputs + (list sbcl-osicat + sbcl-parachute)) + (inputs + (list sbcl-cffi + sbcl-alexandria + sbcl-trivial-features)) + (home-page "https://git.sr.ht/~shunter/posix-shm") + (synopsis "Common Lisp bindings and wrapper for the POSIX shared memory API") + (description + "This library provides two strata to access the POSIX shm API: + +@itemize +@item the package @code{posix-shm/ffi}, a collection of slim bindings to the +POSIX API + +@item the package @code{posix-shm}, a lispy wrapper around the FFI that +integrates more closely to the features of Common Lisp, and provides a handful +of utilities and macros +@end itemize + +Features include: + +@itemize +@item open, close, create, resize, change ownership of, change permissions of, +and memory map to shared memory objects +@item @code{open-shm} appears more like @code{open} from the standard library +@item @code{open-shm*}, for creating anonymous shm objects +@item @code{with-open-shm}, @code{with-mmap} and similar @code{with-} macros +for safely accessing resources with dynamic extent +@end itemize") + (license license:bsd-3))) + +(define-public cl-posix-shm + (sbcl-package->cl-source-package sbcl-posix-shm)) + +(define-public ecl-posix-shm + (let ((pkg (sbcl-package->ecl-package sbcl-posix-shm))) + (package + (inherit pkg) + ;; XXX: An error occurred during initialization: Attempt to redefine + ;; function FTRUNCATE in locked package.. + (arguments + (substitute-keyword-arguments (package-arguments pkg) + ((#:phases phases) + `(modify-phases ,phases + (delete 'build) + (delete 'check)))))))) + (define-public sbcl-trivial-rfc-1123 (let ((commit "9ef59c3fdec08b0e3c9ed02d39533887b6d1b8e3") (revision "0"))