From patchwork Mon May 20 08:58:20 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Herman Rimm X-Patchwork-Id: 64725 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 AF7B427BBF5; Mon, 20 May 2024 10:04:42 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable 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 DE22E27BBEA for ; Mon, 20 May 2024 10:04:36 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s8yvK-0002Sg-Lz; Mon, 20 May 2024 05:03:14 -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 1s8yvD-0002AA-Qn for guix-patches@gnu.org; Mon, 20 May 2024 05:03:07 -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 1s8yvD-0007Jm-EE for guix-patches@gnu.org; Mon, 20 May 2024 05:03:07 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1s8yvH-0007UP-TI; Mon, 20 May 2024 05:03:11 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#71076] [PATCH 15/81] gnu: Add rust-tikv-jemalloc-sys-0.5. Resent-From: Herman Rimm Original-Sender: "Debbugs-submit" Resent-CC: efraim@flashner.co.il, guix-patches@gnu.org Resent-Date: Mon, 20 May 2024 09:03:11 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 71076 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 71076@debbugs.gnu.org Cc: Efraim Flashner X-Debbugs-Original-Xcc: Efraim Flashner Received: via spool by 71076-submit@debbugs.gnu.org id=B71076.171619574928492 (code B ref 71076); Mon, 20 May 2024 09:03:11 +0000 Received: (at 71076) by debbugs.gnu.org; 20 May 2024 09:02:29 +0000 Received: from localhost ([127.0.0.1]:41374 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s8yua-0007PO-RT for submit@debbugs.gnu.org; Mon, 20 May 2024 05:02:29 -0400 Received: from 81-205-150-117.fixed.kpn.net ([81.205.150.117]:37059 helo=email.rimm.ee) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s8ysO-00071L-Ra for 71076@debbugs.gnu.org; Mon, 20 May 2024 05:00:13 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rimm.ee; s=herman; t=1716195599; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=A2iTzRKEIcDkvtOzuhCZUXfjzHatonCb6VPQIPFpL5Y=; b=jUyJJeWHFAekp6fntIiUmoRhBF/4wKUSdur4jbnbSgGZGKX2zGr0N2cuPreISUIUwK6snP eh0/qlr33hhRaCauiyKxXIRggjYVOz5cXysk6UzbB5M+RwNZPpoB+DeDJ24MOk3NJk2Zuq CoF1mAxqLNykT5XEW0fHuN2+26qKfPTrZ+nnEQ0zyrphgOgk8Ry+p+9gwwJsrVQvag22wX lPNHAblaJhSmcgMucb7MjULHkIOjpQzNETszyadorw8hZCiF/NG3HmiiapGq5Uq2Aky9dJ NaLSTQnjfnBI0YNP7xBNgDhMN8ABrSIAJhL3Xs3NtMG4dK4/mMx37MiqG6jmmw== Received: by 81-205-150-117.fixed.kpn.net (OpenSMTPD) with ESMTPSA id 614e3271 (TLSv1.3:TLS_CHACHA20_POLY1305_SHA256:256:NO) for <71076@debbugs.gnu.org>; Mon, 20 May 2024 08:59:59 +0000 (UTC) Date: Mon, 20 May 2024 10:58:20 +0200 Message-ID: <9a33f5d348c0871f4a3fd8cb215be264dab119f7.1716193122.git.herman@rimm.ee> X-Mailer: git-send-email 2.41.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: , Reply-to: Herman Rimm X-ACL-Warn: , Herman Rimm via Guix-patches X-Patchwork-Original-From: Herman Rimm via Guix-patches via From: Herman Rimm 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 * gnu/packages/crates-io.scm (override-jemalloc, rust-tikv-jemalloc-sys-0.5): Add variables. (rust-tikv-jemalloc-sys-0.4): Inherit from rust-tikv-jemalloc-sys-0.5. Change-Id: Ic37cea079d42883b91e8cfd5382fd9d95d658851 --- gnu/packages/crates-io.scm | 49 +++++++++++++++++++++++++++++++------- 1 file changed, 41 insertions(+), 8 deletions(-) diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm index 7076dff8f2..8aee499902 100644 --- a/gnu/packages/crates-io.scm +++ b/gnu/packages/crates-io.scm @@ -128,7 +128,8 @@ (define-module (gnu packages crates-io) #:use-module (gnu packages xorg) #:use-module (gnu packages gtk) #:use-module (gnu packages webkit) - #:use-module (srfi srfi-1)) + #:use-module (srfi srfi-1) + #:export (override-jemalloc)) ;;; ;;; Please: Try to add new module packages in alphabetic order. @@ -82683,6 +82684,18 @@ (define-public rust-thrift-0.13 ("rust-ordered-float" ,rust-ordered-float-1) ("rust-threadpool" ,rust-threadpool-1)))))) +(define override-jemalloc +#~(modify-phases %standard-phases + (add-after 'configure 'override-jemalloc + (lambda* (#:key inputs #:allow-other-keys) + ;; This flag is needed when not using the bundled jemalloc. + ;; https://github.com/tikv/jemallocator/issues/19 + (setenv "CARGO_FEATURE_UNPREFIXED_MALLOC_ON_SUPPORTED_PLATFORMS" + "1") + (setenv "JEMALLOC_OVERRIDE" + (string-append (assoc-ref inputs "jemalloc") + "/lib/libjemalloc_pic.a")))))) + (define-public rust-tikv-jemalloc-ctl-0.4 (package (name "rust-tikv-jemalloc-ctl") @@ -82716,8 +82729,34 @@ (define-public rust-tikv-jemalloc-ctl-0.4 introspection APIs.") (license (list license:expat license:asl2.0)))) +(define-public rust-tikv-jemalloc-sys-0.5 + (package + (name "rust-tikv-jemalloc-sys") + (version "0.5.4+5.3.0-patched") + (source + (origin + (method url-fetch) + (uri (crate-uri "tikv-jemalloc-sys" version)) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 + "1lc5vm1p9dqdvd3mn3264zddnd7z6i95ch3y69prnjgxp0y480ll")) + (modules '((guix build utils))) + (snippet '(delete-file-recursively "jemalloc")))) + (build-system cargo-build-system) + (arguments + (list + #:cargo-inputs (list rust-cc-1 rust-libc-0.2) + #:phases override-jemalloc)) + (native-inputs (list jemalloc)) + (home-page "https://github.com/tikv/jemallocator") + (synopsis "Rust FFI bindings to jemalloc") + (description "This package provides Rust FFI bindings to jemalloc.") + (license (list license:expat license:asl2.0)))) + (define-public rust-tikv-jemalloc-sys-0.4 (package + (inherit rust-tikv-jemalloc-sys-0.5) (name "rust-tikv-jemalloc-sys") (version "0.4.1+5.2.1-patched") (source @@ -82732,18 +82771,12 @@ (define-public rust-tikv-jemalloc-sys-0.4 (modules '((guix build utils))) (snippet '(begin (delete-file-recursively "jemalloc"))))) - (build-system cargo-build-system) (arguments `(#:skip-build? #t #:cargo-inputs (("rust-cc" ,rust-cc-1) ("rust-fs-extra" ,rust-fs-extra-1) - ("rust-libc" ,rust-libc-0.2)))) - (home-page - "https://github.com/tikv/jemallocator") - (synopsis "Rust FFI bindings to jemalloc") - (description "This package provides a Rust FFI bindings to jemalloc.") - (license (list license:expat license:asl2.0)))) + ("rust-libc" ,rust-libc-0.2)))))) (define-public rust-tikv-jemallocator-0.4 (package