From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id gKdIOtJf3GK4KwEAbAwnHQ (envelope-from ) for ; Sat, 23 Jul 2022 22:53:39 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id WONTOdJf3GKFMAAAG6o9tA (envelope-from ) for ; Sat, 23 Jul 2022 22:53:38 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 9923EAA05 for ; Sat, 23 Jul 2022 22:53:38 +0200 (CEST) Received: from localhost ([::1]:56366 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oFM81-0002dF-NA for larch@yhetil.org; Sat, 23 Jul 2022 16:53:37 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41812) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oFM7V-0001iV-Jy for guix-patches@gnu.org; Sat, 23 Jul 2022 16:53:05 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:56690) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oFM7V-0007bn-Aw for guix-patches@gnu.org; Sat, 23 Jul 2022 16:53:05 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oFM7V-0002y7-6z for guix-patches@gnu.org; Sat, 23 Jul 2022 16:53:05 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#56729] [RFC PATCH 10/10] gnu: Add sagemath. Resent-From: vicvbcun Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 23 Jul 2022 20:53:05 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 56729 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 56729@debbugs.gnu.org Cc: vicvbcun Received: via spool by 56729-submit@debbugs.gnu.org id=B56729.165860957311324 (code B ref 56729); Sat, 23 Jul 2022 20:53:05 +0000 Received: (at 56729) by debbugs.gnu.org; 23 Jul 2022 20:52:53 +0000 Received: from localhost ([127.0.0.1]:46429 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oFM7I-0002wU-Ir for submit@debbugs.gnu.org; Sat, 23 Jul 2022 16:52:53 -0400 Received: from mo4-p05-ob.smtp.rzone.de ([85.215.255.131]:40899) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oFM6z-0002uQ-73 for 56729@debbugs.gnu.org; Sat, 23 Jul 2022 16:52:36 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1658609551; s=strato-dkim-0002; d=ikherbers.com; h=References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Cc:Date: From:Subject:Sender; bh=DGiSLXh2nIkPRmghTmmNR80bHiXOqboSfXtIBpGKJa4=; b=qUKwlYwDrGsasf2W5bEyS9bpTi115lZ5YUbvjRRjDlAHlX33eoU4swVcuCgb+WhJ3l ZCxcZ2HLNJosto85DKf+P+6gdOyMFnKaBCuoW3MZE3joBvKfxkwskhRmmi54PHH5ZSEV 8RKxA5hVwy/c+KJbBVZhjTIdazhL57LLJMOZTI051zedQE66LYBuNoHhhnd8Aj2vyG+0 mAhC2e6nsGXaFnSRIrfBNLPZ0px1MzuY66MsCTyhu9lzCNOxGpppiZeCF/iV4XcTyBTB 0U8Do5bw/TrDkAPaqq01GyM2FvbKGf6rGN0m7jv0UVkGYwjSZoRYEEzgPR+zQZ9VlROx EUVg== X-RZG-AUTH: ":IUwNfkitaf3qOWm2b/jA5tveVwUUcwH3PkiYp6DPxTDDEo4xO9KsAGjusLvh3llVxq3loQ==" X-RZG-CLASS-ID: mo05 Received: from lambda.localdomain by smtp.strato.de (RZmta 47.47.0 DYNA|AUTH) with ESMTPSA id Vdcb24y6NKqVD6j (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Sat, 23 Jul 2022 22:52:31 +0200 (CEST) From: vicvbcun Date: Sat, 23 Jul 2022 22:52:04 +0200 Message-Id: <8b34d84b936a6f6d94479116e15bd5dfa2cd2cdb.1658595756.git.guix@ikherbers.com> X-Mailer: git-send-email 2.37.0 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1658609618; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=DGiSLXh2nIkPRmghTmmNR80bHiXOqboSfXtIBpGKJa4=; b=RCH+8Cxczr+hOmlNqq+vz7V3v84xbR/1jXac/+rWWxZR3UlIu29acXkH+oIdz0Evjlf9hj ibf89zZ1qzg62coC6C0nh6rVRjJxRfQGot5TxIdMh1r/4V+mWGob56pmzvZS9myej5EL+p Zyod9aw275Xb/ROuhLXKkbLN5UCSj9cPuCuLKsnJXezJDFhg+GH/KMJ2EVhNcAjfonkvob nBuXi5WEp4RjxsRmQagXgBsT0bJyitMxlkeXloNp30Gltu4U+X574A3+CAw83sKq4MoLSe JdGWSODtMTI1j3h33yqh4ZXfJv0N2sbEiBgmCtZHR080virlwXqwh5LUB95Plw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1658609618; a=rsa-sha256; cv=none; b=PajI2yDqS7du0LvBgCFs0yjXMwBTkEOUh8sVQwH10dKcN9L7/AjvqstV+9d8cf6uP0rV/t 0/6i2eFA7bsZFWcR1y5FSMqWst98L9BV8WZ+iCwSj3uGI96pP8jLa+5p5mfV1jyC6PzJdz q7bKojzSjw9iL0JqdJ4DDVy7FDeM5JPZs+pC+DIua9Osap+1QLJ1bnYcY18FrDNn/1befd Eb7D4QDKqgSPaMIqXyGUoGqMCvKp7e7k4apzJx0PRH5/JA/DcJI7EkGvreH7R47jKqKv1C WaIo1mOg/S37hCirorRdnRCdgMS6J23nuyP1uUQxIkfpykAwdKEvFTMpz4MuRg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=ikherbers.com header.s=strato-dkim-0002 header.b=qUKwlYwD; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: 1.57 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=ikherbers.com header.s=strato-dkim-0002 header.b=qUKwlYwD; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 9923EAA05 X-Spam-Score: 1.57 X-Migadu-Scanner: scn0.migadu.com X-TUID: u8mx95cUon/O * gnu/packages/sagemath.scm (sagemath): New variable. --- Notes: - I'm not sure about native inputs vs. inputs here. - There is a broken symlink in share/jupyter/kernels/sagemath/doc is currently a broken symlink. We should probably remove it and add it into the documentation output. - bin/ is currently full of random stuff, we probably only need a few things. gnu/packages/sagemath.scm | 106 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 106 insertions(+) diff --git a/gnu/packages/sagemath.scm b/gnu/packages/sagemath.scm index 335d98d9f4..f84440db93 100644 --- a/gnu/packages/sagemath.scm +++ b/gnu/packages/sagemath.scm @@ -4,6 +4,7 @@ ;;; Copyright © 2019, 2020 Tobias Geerinckx-Rice ;;; Copyright © 2020 Jakub Kądziołka ;;; Copyright © 2021 Efraim Flashner +;;; Copyright © 2022 vicvbcun ;;; ;;; This file is part of GNU Guix. ;;; @@ -25,6 +26,7 @@ (define-module (gnu packages sagemath) #:use-module (guix build-system gnu) #:use-module (guix build-system python) #:use-module (guix download) + #:use-module (guix gexp) #:use-module (guix git-download) #:use-module (guix packages) #:use-module (guix utils) @@ -34,6 +36,8 @@ (define-module (gnu packages sagemath) #:use-module (gnu packages bdw-gc) #:use-module (gnu packages boost) #:use-module (gnu packages compression) + #:use-module (gnu packages gd) + #:use-module (gnu packages graph) #:use-module (gnu packages image) #:use-module (gnu packages lisp) #:use-module (gnu packages maths) @@ -41,6 +45,7 @@ (define-module (gnu packages sagemath) #:use-module (gnu packages pkg-config) #:use-module (gnu packages popt) #:use-module (gnu packages python) + #:use-module (gnu packages python-build) #:use-module (gnu packages python-xyz)) @@ -400,3 +405,104 @@ (define-public python-pplpy "This Python module pplpy provides a wrapper to the C++ Parma Polyhedra Library (PPL).") (license license:gpl3))) + +(define-public sagemath + (package + (name "sagemath") + (version "9.6") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/sagemath/sage") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "0k91l3aid09hy94ps2r6acg22bxgsprxnh1b92hma3z1mn0ii3s1")))) + (build-system python-build-system) + (arguments + (list #:tests? #f ; may take a long time, I'm scared + #:use-setuptools? #f + #:phases #~(modify-phases %standard-phases + (add-after 'unpack 'prepare-build + (lambda _ + (setenv "SAGE_NUM_THREADS" + (number->string (parallel-job-count))) + (setenv "SAGE_VENV" #$output) + (chdir "src"))) + (add-after 'install 'fix-logo-symlinks + ;; these symlinks point to /tmp/guix-build-... so we + ;; need to recreate them + (lambda _ + (for-each + (lambda (file) + (let + ((source (string-append "sage/ext_data/notebook-ipython/" file)) + (target (string-append #$output "/share/jupyter/kernels/sagemath/" file))) + (delete-file target) + (copy-file source target))) + '("logo.svg" "logo-64x64.png")))) + (add-after 'install 'delete-nbextensions + ;; broken symlink to threejs-sage which we + ;; don't even package + (lambda _ + (delete-file-recursively (string-append #$output "/share/jupyter/nbextensions")))) + (add-after 'install 'install-bin + ;; so far, we have only installed the + ;; library part of sage + (lambda _ + ;; this copies way to much + (copy-recursively "bin" (string-append #$output "/bin"))))))) + (inputs (list arb + boost + brial + cliquer + ecl + eclib + edge-addition-planarity-suite + flint + gap + gd + giac + givaro + glpk + gmp + gmp-ecm + gsl + iml + lcalc + libbraiding + libhomfly + linbox + m4ri + m4rie + mpc + mpfi + ntl + openblas + pari-gp + python-cypari2 + python-gmpy2 + python-jinja2 + python-jupyter-core + python-memory-allocator + python-numpy + python-pkgconfig + python-pplpy + python-setuptools + python-wheel + rw + singular + symmetrica + zlib + zn-poly)) + (native-inputs (list pkg-config python-cython)) + (home-page "https://www.sagemath.org") + (synopsis "Python-based computer algebra system") + (description + "SageMath is a free open-source mathematics software system licensed under the +GPL. It builds on top of many existing open-source packages: NumPy, SciPy, +matplotlib, Sympy, Maxima, GAP, FLINT, R and many more. Access their combined +power through a common, Python-based language or directly via interfaces or +wrappers.") + (license license:gpl3))) -- 2.37.0