From patchwork Tue Dec 1 01:44:59 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ryan Prior X-Patchwork-Id: 25499 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 8786F27BBF9; Tue, 1 Dec 2020 01:46:14 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL, SPF_HELO_PASS,T_DKIM_INVALID,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 0D7D027BBF8 for ; Tue, 1 Dec 2020 01:46:14 +0000 (GMT) Received: from localhost ([::1]:45432 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kjuk9-0002SY-8c for patchwork@mira.cbaines.net; Mon, 30 Nov 2020 20:46:13 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:55470) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kjujy-0002S7-7G for guix-patches@gnu.org; Mon, 30 Nov 2020 20:46:05 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:45677) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kjujy-0006hO-06 for guix-patches@gnu.org; Mon, 30 Nov 2020 20:46:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kjujx-0007fG-U9 for guix-patches@gnu.org; Mon, 30 Nov 2020 20:46:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#44978] [PATCH] gnu: packages: Add tiny-bignum. Resent-From: Ryan Prior Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 01 Dec 2020 01:46:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 44978 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 44978@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.160678711429400 (code B ref -1); Tue, 01 Dec 2020 01:46:01 +0000 Received: (at submit) by debbugs.gnu.org; 1 Dec 2020 01:45:14 +0000 Received: from localhost ([127.0.0.1]:57223 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kjujC-0007e8-4B for submit@debbugs.gnu.org; Mon, 30 Nov 2020 20:45:14 -0500 Received: from lists.gnu.org ([209.51.188.17]:44844) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kjuj9-0007e0-Qk for submit@debbugs.gnu.org; Mon, 30 Nov 2020 20:45:12 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:55344) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kjuj9-0002Ob-IZ for guix-patches@gnu.org; Mon, 30 Nov 2020 20:45:11 -0500 Received: from mail-40136.protonmail.ch ([185.70.40.136]:42412) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kjuj6-0006da-EE for guix-patches@gnu.org; Mon, 30 Nov 2020 20:45:10 -0500 Date: Tue, 01 Dec 2020 01:44:59 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail; t=1606787104; bh=Szrqch+oz1J0w6xthMbH6QSqDdaWqagoPYM2uSbMml0=; h=Date:To:From:Reply-To:Subject:From; b=QzImFuU58dUcN67Bz924VfKuvDIqX59zhnQC37yB8wGk17J6VitDXDNrrJHwq3KCd hA3hl5o8cfjz56YASSOl4aIckwInJMsk6im+fgdTBdbK6hPocz3QxFbReF/iHibEc4 NE4lgeQ7INTfgM2UK4yHdfsZ7DyMNm/kJm8dOagk= Message-ID: <20201201014454.18663-1-rprior@protonmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=185.70.40.136; envelope-from=rprior@protonmail.com; helo=mail-40136.protonmail.ch X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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" Reply-to: Ryan Prior , Ryan Prior via Guix-patches X-Patchwork-Original-From: Ryan Prior via Guix-patches via From: Ryan Prior X-getmail-retrieved-from-mailbox: Patches * gnu/packages/maths.scm (tiny-bignum): New variable. --- gnu/packages/maths.scm | 46 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm index d3f3539e26..a0dd9a761c 100644 --- a/gnu/packages/maths.scm +++ b/gnu/packages/maths.scm @@ -4984,6 +4984,52 @@ be fed to @command{tcalc} through the command line.") (home-page "https://sites.google.com/site/mohammedisam2000/tcalc") (license license:gpl3+))) +(define-public tiny-bignum + (let ((commit "1d7a1f9b8e77316187a6b3eae8e68d60a6f9a4d4")) + (package + (name "tiny-bignum") + (version (git-version "0" "0" commit)) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/kokke/tiny-bignum-c") + (commit commit))) + (file-name (git-file-name "tiny-bignum" commit)) + (sha256 + (base32 "0vj71qlhlaa7d92bfar1kwqv6582dqrby8x3kdw0yzh82k2023g6")))) + (build-system gnu-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + (delete 'configure) + (replace 'check + (lambda _ + (substitute* "scripts/test_rand.py" + (("\t") " ") + (("\" % (\\w+)" _ symbol) (string-append "\" % int(" symbol ")"))) + (invoke "make" "test"))) + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (let ((share (string-append (assoc-ref outputs "out") "/share")) + (doc (string-append (assoc-ref outputs "out") "/doc"))) + (mkdir-p share) + (install-file "bn.c" share) + (install-file "bn.h" share) + (mkdir-p doc) + (install-file "LICENSE" doc) + (install-file "README.md" doc))))))) + (native-inputs + `(("python" ,python-wrapper))) + (home-page "https://github.com/kokke/tiny-bignum-c") + (synopsis "Small portable multiple-precision unsigned integer arithmetic in C") + (description + "This library provides portable Arbitrary-precision unsigned integer +arithmetic in C, for calculating with large numbers. Basic arithmetic (+, -, +*, /, %) and bitwise operations (&, |, ^. <<, >>) plus increments, decrements +and comparisons are supported.") + (license license:unlicense)))) + (define-public sundials (package (name "sundials")