From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id +Hy2EDww8WKmrwAAbAwnHQ (envelope-from ) for ; Mon, 08 Aug 2022 17:48:12 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id cD+9EDww8WLoxwAA9RJhRA (envelope-from ) for ; Mon, 08 Aug 2022 17:48:12 +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 BC64D35C2 for ; Mon, 8 Aug 2022 17:48:11 +0200 (CEST) Received: from localhost ([::1]:47958 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oL4zC-0000F9-Ur for larch@yhetil.org; Mon, 08 Aug 2022 11:48:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41164) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oL4z6-0000DB-CD for guix-patches@gnu.org; Mon, 08 Aug 2022 11:48:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:51994) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oL4z6-0006mT-3K for guix-patches@gnu.org; Mon, 08 Aug 2022 11:48:04 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oL4z5-000681-Vk for guix-patches@gnu.org; Mon, 08 Aug 2022 11:48:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#56729] [RFC PATCH v2 27/29] gnu: Add sagemath-just-build. Resent-From: vicvbcun Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 08 Aug 2022 15:48:03 +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: Ludovic =?UTF-8?Q?Court=C3=A8s?= , Andreas Enge Received: via spool by 56729-submit@debbugs.gnu.org id=B56729.165997364523129 (code B ref 56729); Mon, 08 Aug 2022 15:48:03 +0000 Received: (at 56729) by debbugs.gnu.org; 8 Aug 2022 15:47:25 +0000 Received: from localhost ([127.0.0.1]:41682 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oL4yT-00060s-7g for submit@debbugs.gnu.org; Mon, 08 Aug 2022 11:47:25 -0400 Received: from mo4-p05-ob.smtp.rzone.de ([85.215.255.131]:33675) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oL4yQ-00060K-8N for 56729@debbugs.gnu.org; Mon, 08 Aug 2022 11:47:23 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1659973639; 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=nFXAgObdRysWMq/Z8lzpKO7iTiHg1w6qdV9HptbHFrg=; b=HrCGID0cYBcodpogCX8oO+RM6vBvu3MOUINxYrrp3AiEFOk0SU0xo1sBK6CfA7/Bmd JLQv198S4eWkM0VLKHzZ3Tu2c/94rz04vbzOxiP5A9yBe4zSf/LVpBgDTlZ1HFaUtojG V4c7cGAhCayH2fKfR80hDDEPkGDQnagwpwpLePWxO59GMX6qpc3+5Nx1e8HP4eGAlZyL xfiLqecDOJg/W7CYRaDSsMLbz8Ro6Qh+c4PZ+wJ+vBeEpXSwyKooLDXZYDD/wVeZJK+O y4tK88RnevQndmp2ZGydmwFoD2iOrJW10vwOprxQaO4rJz/O0yWAJGEk2VMAzaVjbvpa rrjQ== X-RZG-AUTH: ":IUwNfkitaf3qOWm2b/jA5tveVwUUcwH3PkiYp6DPxTDDEo4xO9ymAEzKSWlvmNAhIG6s" X-RZG-CLASS-ID: mo05 Received: from lambda.localdomain by smtp.strato.de (RZmta 47.47.0 DYNA|AUTH) with ESMTPSA id 0cac6cy78FlIoRZ (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Mon, 8 Aug 2022 17:47:18 +0200 (CEST) From: vicvbcun Date: Mon, 8 Aug 2022 17:46:02 +0200 Message-Id: X-Mailer: git-send-email 2.37.0 In-Reply-To: References: MIME-Version: 1.0 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=1659973691; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: 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=nFXAgObdRysWMq/Z8lzpKO7iTiHg1w6qdV9HptbHFrg=; b=SvPvsLt/BbTlV+R6kSlLBF6WqEK0K1pb+rbSE+nL9bqnywewl4iAfOWT1jd1gO4RrJW/cD CncYM3rldS/W/sweo7F8zem9qnxnH0CfL0vGvuDCxdfRRVfEQcA7parkfANm6J9ifg04sk cLAhR6GJxPKyex0l2BlklNefFQ1Z5MCllvaK3ZGXvNIL8RnyKbt+bnONmMJT5VKIKVOG3l +IShEtrTxPDTZp4YzQLPsvJfndHREB9UR1GvUGIN15J+258bgGxlDqUBOfrIadKP/FeAx+ cELEaExnFJCcucLcyd/gJxQkvOseM/4J1YRJY0EZq/DN8YkEwwbTPKw8YlpqiA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1659973691; a=rsa-sha256; cv=none; b=RRlOHaJ3TlyOicAJ03QZLMtu/g+68iCt8LHhUdJ5M1gMRK3/B3o0nZne4VWtYsF89yPmrN kWsohQjGLOOLBpA8XsCFIIFI79uvt04gnIrfBFhFXlFN8NbqFR1Y68wWWbgU83j2RBc3CL jsr8EYpt3Q20Pa3Hq3sBr37eHg/gw3DOWrjAWW+bzI99TXhduaS5tjpLKlJUYmWMZDH/jd cIj1RD+zRlY9U49nl0hE3jNn63wNcOtp1WLSNYTH3cgAfh7yzli3Nui+bdkFQJGGc6WxPF GsgwplyCn0FMq3uGKmyWnzZqcgPGFoNlRq1pKHGYQ3MgApHyygpf9iqOvHH+Jw== 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=HrCGID0c; 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: 2.61 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=ikherbers.com header.s=strato-dkim-0002 header.b=HrCGID0c; 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: BC64D35C2 X-Spam-Score: 2.61 X-Migadu-Scanner: scn1.migadu.com X-TUID: mM6F+4Hc7qHx * gnu/packages/sagemath.scm (sagemath-just-build): New variable. --- gnu/packages/sagemath.scm | 134 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 134 insertions(+) diff --git a/gnu/packages/sagemath.scm b/gnu/packages/sagemath.scm index 5a3c893b61..cf48182047 100644 --- a/gnu/packages/sagemath.scm +++ b/gnu/packages/sagemath.scm @@ -39,6 +39,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) @@ -46,6 +48,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)) @@ -772,3 +775,134 @@ (define-public pari-galdata (description synopsis) ;; see home-page (license license:gpl2+))) + +;;; This only builds sagemath, using the minimum set of dependencies +(define-public sagemath-just-build + (package + (name "sagemath-just-build") + (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 ; see sagemath-tests + #:use-setuptools? #f + #:modules '((guix build python-build-system) + (guix build utils) + (ice-9 ftw)) + #: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-missing-files + ;; not installed yet for some reason + (lambda _ + (copy-recursively "sage/ext_data" + (string-append #$output "/lib/python3.9/site-packages/sage/ext_data")) + (install-file "sage/libs/gap/sage.gaprc" + (string-append #$output "/lib/python3.9/site-packages/sage/libs/gap")) + (install-file "sage/interfaces/sage-maxima.lisp" + (string-append #$output "/lib/python3.9/site-packages/sage/interfaces")))) + (add-after 'install 'install-bin + ;; so far, we have only installed the + ;; library part of sage + (lambda _ + (copy-recursively "bin" (string-append #$output "/bin")) + ;; we don't need these + (delete-file (string-append #$output "/bin/sage-env-config.in")) + (delete-file (string-append #$output "/bin/sage-src-env-config.in")))) + (add-after 'install-bin 'wrap-bin + (lambda _ + (with-directory-excursion (string-append #$output "/bin") + (for-each + (lambda (file) + (wrap-program file + `("PATH" ":" suffix (,(string-append #$output "/bin") + #$(file-append sed "/bin") + #$(file-append coreutils "/bin") + #$(file-append python "/bin"))))) + (scandir "." + ;; select only executables + (lambda (file) + (and (eq? 'regular (stat:type (stat file))) + (access? file X_OK))))))))))) + (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