From patchwork Wed Apr 3 22:46:32 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christina O'Donnell X-Patchwork-Id: 62687 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 C483527BBEA; Wed, 3 Apr 2024 23:54:23 +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.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, 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 18E3827BBE2 for ; Wed, 3 Apr 2024 23:54:21 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rs9UY-00065t-7W; Wed, 03 Apr 2024 18:54:02 -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 1rs9UV-00065L-M7 for guix-patches@gnu.org; Wed, 03 Apr 2024 18:53:59 -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 1rs9UV-0004cR-Da for guix-patches@gnu.org; Wed, 03 Apr 2024 18:53:59 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rs9UZ-0001FV-Fy for guix-patches@gnu.org; Wed, 03 Apr 2024 18:54:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#56576] [PATCH v3 1/3] gnu: Add markdeep. References: <20220715145735.5752-1-antero@mailbox.org> In-Reply-To: <20220715145735.5752-1-antero@mailbox.org> Resent-From: Christina O'Donnell Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 03 Apr 2024 22:54:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 56576 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 56576@debbugs.gnu.org Cc: Maxime Devos , Christina O'Donnell , Steve George Received: via spool by 56576-submit@debbugs.gnu.org id=B56576.17121848134640 (code B ref 56576); Wed, 03 Apr 2024 22:54:03 +0000 Received: (at 56576) by debbugs.gnu.org; 3 Apr 2024 22:53:33 +0000 Received: from localhost ([127.0.0.1]:59909 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rs9U4-0001Cm-Sh for submit@debbugs.gnu.org; Wed, 03 Apr 2024 18:53:33 -0400 Received: from vmi993448.contaboserver.net ([194.163.141.236]:45548 helo=mutix.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rs9Ty-0001Bz-Ow for 56576@debbugs.gnu.org; Wed, 03 Apr 2024 18:53:29 -0400 Received: from [86.132.246.87] (host81-147-82-218.range81-147.btcentralplus.com [81.147.82.218]) (Authenticated sender: cdo) by mutix.org (Postfix) with ESMTPSA id 4B329A60825; Thu, 4 Apr 2024 00:53:20 +0200 (CEST) From: Christina O'Donnell Date: Wed, 3 Apr 2024 23:46:32 +0100 Message-ID: X-Mailer: git-send-email 2.41.0 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 * gnu packages/documentation.scm (markdeep): New variable. Change-Id: I34303377f50740ba357c1bb299c9434079a6e23d --- gnu/packages/documentation.scm | 65 ++++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) Hi, I've gone through these patches, making the changes that Maxime listed and that came up from `guix lint`. I've added the additional package markdeep, which is a css/javascript rendering library needed for stddoc. I checked these very carefully, but I'm new to this so it's likely that I've made at least a few mistakes. Everything appears to be working as far as I've tested it. I had anything to test nuklear with, so I'm taking that part on faith. Let me know whether there's anything that I could change or do better for next time. Kind regards, Christina base-commit: 4d994f98a49e1a6e58b9b0b512a05efc1c431a50 diff --git a/gnu/packages/documentation.scm b/gnu/packages/documentation.scm index 83c4313bd7..da930c7304 100644 --- a/gnu/packages/documentation.scm +++ b/gnu/packages/documentation.scm @@ -37,6 +37,7 @@ (define-module (gnu packages documentation) #:use-module (guix git-download) #:use-module (guix build-system gnu) #:use-module (guix build-system cmake) + #:use-module (guix build-system copy) #:use-module (guix build-system perl) #:use-module (guix build-system python) #:use-module (guix build-system qt) @@ -57,11 +58,13 @@ (define-module (gnu packages documentation) #:use-module (gnu packages graphviz) #:use-module (gnu packages gettext) #:use-module (gnu packages glib) + #:use-module (gnu packages javascript) #:use-module (gnu packages perl) #:use-module (gnu packages pkg-config) #:use-module (gnu packages qt) #:use-module (gnu packages sqlite) #:use-module (gnu packages sphinx) + #:use-module (gnu packages uglifyjs) #:use-module (gnu packages xml) #:use-module (gnu packages xorg)) @@ -453,3 +456,65 @@ (define-public zeal (description "Zeal is a simple offline documentation browser inspired by Dash.") (license license:gpl3+)))) + +(define-public markdeep + (package + (name "markdeep") + (version "1.16") + (home-page "https://casual-effects.com/markdeep/") + (source + (origin (method git-fetch) + (uri (git-reference + (url "https://github.com/morgan3d/markdeep") + (commit (string-append "v0" version)))) + (sha256 + (base32 "05bvw3993xh1260ckclwk4jw38hvgiff0b2940ryhbhz0p1k41l8")))) + (build-system copy-build-system) + (arguments + (list #:modules '((guix build utils) + (guix build copy-build-system) + (ice-9 popen)) + #:install-plan ''(("." "/share/markdeep/")) + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'patch-urls + (lambda _ + (for-each (lambda (filename) + + (substitute* filename + ;; Don't include a reference to the remote version. + (("") + "") + (("MATHJAX_URL = .*$") + ;; Use our local copy of mathjax + (string-append "MATHJAX_URL = 'file://" #$js-mathjax + "/share/javascript/es5/tex-mml-chtml.js'")))) + (find-files "." (lambda (file stat) + (string-suffix? ".js" file)))))) + (add-before 'install 'minify + (lambda _ + (for-each (lambda (filename) + (let ((minified-filename + (string-append (string-drop-right filename 3) + ".min.js"))) + (format #t "~a -> ~a~%" filename minified-filename) + (let ((minified (open-pipe* OPEN_READ "uglifyjs" filename))) + (call-with-output-file minified-filename + (lambda (port) + (dump-port minified port))) + + (let ((exit (close-pipe minified))) + (unless (zero? exit) + (error "uglifyjs failed" exit)))))) + (find-files "latest" + (lambda (path stat) + (and (string-suffix? ".js" path) + (not (string-suffix? ".min.js" path))))))))))) + (inputs (list js-mathjax)) + (native-inputs (list uglifyjs)) + (synopsis "Tool for displaying markdown documents in a web-browser") + (description "Markdeep is a technology for writing plain text documents that can +be displayed in any web browser, whether local or remote. It supports diagrams, +calendars, equations, and other features as extensions of Markdown syntax.") + (license license:bsd-2))) From patchwork Wed Apr 3 22:46:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christina O'Donnell X-Patchwork-Id: 62689 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 8D95D27BBE9; Wed, 3 Apr 2024 23:56:14 +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.8 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, SPF_HELO_PASS,URIBL_BLOCKED,URIBL_SBL_A 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 E561227BBE2 for ; Wed, 3 Apr 2024 23:56:12 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rs9WT-0006RN-M4; Wed, 03 Apr 2024 18:56:01 -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 1rs9WR-0006Qt-4Z for guix-patches@gnu.org; Wed, 03 Apr 2024 18:55:59 -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 1rs9WQ-0005Ol-TB for guix-patches@gnu.org; Wed, 03 Apr 2024 18:55:58 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rs9WU-0001TT-JY for guix-patches@gnu.org; Wed, 03 Apr 2024 18:56:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#56576] [PATCH v3 2/3] gnu: Add stddoc. Resent-From: Christina O'Donnell Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 03 Apr 2024 22:56:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 56576 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 56576@debbugs.gnu.org Cc: Maxime Devos , Christina O'Donnell , Steve George Received: via spool by 56576-submit@debbugs.gnu.org id=B56576.17121849235414 (code B ref 56576); Wed, 03 Apr 2024 22:56:02 +0000 Received: (at 56576) by debbugs.gnu.org; 3 Apr 2024 22:55:23 +0000 Received: from localhost ([127.0.0.1]:59913 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rs9Vo-0001Om-KI for submit@debbugs.gnu.org; Wed, 03 Apr 2024 18:55:22 -0400 Received: from vmi993448.contaboserver.net ([194.163.141.236]:38754 helo=mutix.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rs9Vl-0001OQ-O6 for 56576@debbugs.gnu.org; Wed, 03 Apr 2024 18:55:18 -0400 Received: from [86.132.246.87] (host81-147-82-218.range81-147.btcentralplus.com [81.147.82.218]) (Authenticated sender: cdo) by mutix.org (Postfix) with ESMTPSA id 6723EA60825; Thu, 4 Apr 2024 00:55:12 +0200 (CEST) From: Christina O'Donnell Date: Wed, 3 Apr 2024 23:46:34 +0100 Message-ID: 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: , 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/documentation.scm (stddoc): New variable. Change-Id: I0f60126ef78a45733ad7395352e9bad49561437b --- gnu/packages/documentation.scm | 57 ++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) diff --git a/gnu/packages/documentation.scm b/gnu/packages/documentation.scm index da930c7304..c9ec860fef 100644 --- a/gnu/packages/documentation.scm +++ b/gnu/packages/documentation.scm @@ -518,3 +518,60 @@ (define-public markdeep be displayed in any web browser, whether local or remote. It supports diagrams, calendars, equations, and other features as extensions of Markdown syntax.") (license license:bsd-2))) + +(define-public stddoc + (let ((commit "6eef9deaf2e36bae812f50e448a8012b3e5efb14") + (revision "1")) + (package + (name "stddoc") + (version (git-version "1.0.2" revision commit)) + (home-page "https://github.com/r-lyeh/stddoc.c") + (source + (origin + (method git-fetch) + (uri (git-reference + (url home-page) + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 "06phjp7wbf4x1sagxwfapgv6iyiixmijxxbg2clb48kyvjg5mlwn")) + (snippet #~(delete-file "stddoc.c.html")))) + (build-system gnu-build-system) + (arguments + (list #:tests? #f ; no tests + #:phases + #~(modify-phases %standard-phases + (replace 'configure + (lambda _ + (substitute* "stddoc.c" + ;; Note: For some reason quote characters are being + ;; inserted into urls and tags, eg. + ;; 'https://morgan3d.github.io/m""arkdeep/latest/markdeep.min.js?' + (("https://casual-effects.com/m\"*arkdeep/latest/") + (string-append #$markdeep "/share/markdeep/latest/")) + (("https://morgan3d.github.io/m\"*arkdeep/latest/") + (string-append #$markdeep "/share/markdeep/latest/"))))) + (replace 'build + (lambda _ + (invoke #$(cc-for-target) + "-O2" "-g" "-o" "stddoc" "stddoc.c") + (with-input-from-file "stddoc.c" + (lambda _ + (with-output-to-file "stddoc.c.html" + (lambda _ + (invoke #$(if (%current-target-system) + "stddoc" + "./stddoc")))))))) + (replace 'install + (lambda _ + (install-file "stddoc" + (string-append #$output "/bin")) + (install-file "stddoc.c.html" + (string-append #$output + "/share/doc"))))))) + (native-inputs (if (%current-target-system) (list this-package) '())) + (synopsis "Documentation generator for multiple programming languages") + (description "@code{stddoc.c} is a tiny documentation generator with many +supported programming languages. Markdeep code comments are extracted from stdin and +printed into stdout as a HTML file.") + (license license:unlicense)))) From patchwork Wed Apr 3 22:46:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christina O'Donnell X-Patchwork-Id: 62688 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 ACC0727BBE9; Wed, 3 Apr 2024 23:56:11 +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.9 required=5.0 tests=BAYES_00,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 C5C4B27BBE2 for ; Wed, 3 Apr 2024 23:56:10 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rs9WR-0006R1-Js; Wed, 03 Apr 2024 18:55:59 -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 1rs9WQ-0006Ql-P4 for guix-patches@gnu.org; Wed, 03 Apr 2024 18:55:58 -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 1rs9WQ-0005Os-Gz for guix-patches@gnu.org; Wed, 03 Apr 2024 18:55:58 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rs9WV-0001Tb-3M for guix-patches@gnu.org; Wed, 03 Apr 2024 18:56:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#56576] [PATCH v3 3/3] gnu: Add nuklear. Resent-From: Christina O'Donnell Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 03 Apr 2024 22:56:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 56576 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 56576@debbugs.gnu.org Cc: Maxime Devos , Antero Mejr , Steve George Received: via spool by 56576-submit@debbugs.gnu.org id=B56576.17121849295455 (code B ref 56576); Wed, 03 Apr 2024 22:56:03 +0000 Received: (at 56576) by debbugs.gnu.org; 3 Apr 2024 22:55:29 +0000 Received: from localhost ([127.0.0.1]:59916 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rs9Vw-0001Pk-2F for submit@debbugs.gnu.org; Wed, 03 Apr 2024 18:55:28 -0400 Received: from vmi993448.contaboserver.net ([194.163.141.236]:45482 helo=mutix.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rs9Vr-0001PM-IW for 56576@debbugs.gnu.org; Wed, 03 Apr 2024 18:55:26 -0400 Received: from [86.132.246.87] (host81-147-82-218.range81-147.btcentralplus.com [81.147.82.218]) (Authenticated sender: cdo) by mutix.org (Postfix) with ESMTPSA id 46373A60825; Thu, 4 Apr 2024 00:55:18 +0200 (CEST) From: Christina O'Donnell Date: Wed, 3 Apr 2024 23:46:35 +0100 Message-ID: <4a93e473cec7579f04fb4307f12520f09110b622.1712184392.git.cdo@mutix.org> 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: , 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: Antero Mejr * gnu/packages/toolkits.scm (nuklear): New variable. --- gnu/packages/toolkits.scm | 49 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/gnu/packages/toolkits.scm b/gnu/packages/toolkits.scm index 9d002ecab1..3ba3399899 100644 --- a/gnu/packages/toolkits.scm +++ b/gnu/packages/toolkits.scm @@ -19,6 +19,7 @@ ;;; along with GNU Guix. If not, see . (define-module (gnu packages toolkits) + #:use-module (gnu packages documentation) #:use-module (gnu packages fontutils) #:use-module (gnu packages gl) #:use-module (gnu packages sdl) @@ -27,6 +28,7 @@ (define-module (gnu packages toolkits) #:use-module (guix packages) #:use-module (guix utils) #:use-module (guix build-system gnu) + #:use-module (guix build-system python) #:use-module (guix git-download)) (define-public imgui @@ -181,3 +183,50 @@ (define-public imgui-1.86 (inputs (modify-inputs (package-inputs imgui) (delete "freetype"))))) + +(define-public nuklear + (package + (name "nuklear") + (version "4.12.0") + (home-page "https://github.com/Immediate-Mode-UI/Nuklear") + (source (origin + (method git-fetch) + (uri (git-reference + (url home-page) + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "13cswwdys4hqdvbm4g4b9l269i16s7c4204j16v67ghj3b4mjifg")) + (snippet #~(begin (delete-file "nuklear.h") + (delete-file "doc/index.html"))))) + (build-system python-build-system) + (arguments + (list #:tests? #f ;no tests + #:phases #~(modify-phases %standard-phases + (delete 'configure) + (replace 'build + (lambda _ + (with-directory-excursion "src" + (invoke "./paq.sh")) + (with-directory-excursion "doc" + (with-input-from-file "../nuklear.h" + (lambda _ + (with-output-to-file "index.html" + (lambda _ + (invoke "stddoc")))))))) + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (install-file "nuklear.h" + (string-append #$output "/include")) + (install-file "doc/index.html" + (string-append #$output + "/share/doc"))))))) + (native-inputs (list stddoc)) + (synopsis "Graphical user interface toolkit written in ANSI C") + (description "This package provides an immediate-mode graphical user +interface toolkit. It was designed as an embeddable user interface +for applications and does not have any dependencies, a default render backend +or OS window/input handling. The library is self contained in one single header +file and can be used either in header only mode or in implementation mode.") + (license (list license:unlicense license:expat))))