From unknown Thu Jun 19 14:31:34 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#63898] [PATCH] gnu: Add plan9port. Resent-From: Antero Mejr Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 05 Jun 2023 00:09:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 63898 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 63898@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.168592369722026 (code B ref -1); Mon, 05 Jun 2023 00:09:01 +0000 Received: (at submit) by debbugs.gnu.org; 5 Jun 2023 00:08:17 +0000 Received: from localhost ([127.0.0.1]:47578 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q5xlg-0005jC-Be for submit@debbugs.gnu.org; Sun, 04 Jun 2023 20:08:16 -0400 Received: from lists.gnu.org ([209.51.188.17]:42376) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q5xle-0005j2-Nm for submit@debbugs.gnu.org; Sun, 04 Jun 2023 20:08:15 -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 1q5xlb-0000zp-Ow for guix-patches@gnu.org; Sun, 04 Jun 2023 20:08:13 -0400 Received: from mout-p-202.mailbox.org ([2001:67c:2050:0:465::202]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_CHACHA20_POLY1305:256) (Exim 4.90_1) (envelope-from ) id 1q5xlY-0003eU-04 for guix-patches@gnu.org; Sun, 04 Jun 2023 20:08:09 -0400 Received: from smtp202.mailbox.org (smtp202.mailbox.org [IPv6:2001:67c:2050:b231:465::202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-202.mailbox.org (Postfix) with ESMTPS id 4QZDTG2HhZz9sGf for ; Mon, 5 Jun 2023 02:08:02 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1685923682; 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; bh=A48oncfahcQBD3k8uifIwyUdmpKiUJZysA7Vvx/aKv4=; b=i6noQ0I9XfxFNLjnYYJOtGCrhY9t0jYdWQg6ohxGEuRXd08dU8z7mCVm6rq1K3n5Acc5Qy AjOwkB8i4Aq7koQb3MVSESLMAj/fLGSGRNARE+4yD5+meciJV8Dz+wfWz0B7dYjT1945ON xq0K8C4s/M/Atx2c2LMsbP+9OwEF3CkJTqx2tP/eEjeRhCo2op9MhlfTmzIzC/oSSEXU/w QRbjxD+HuTE/8WPvlJbbo2GtwtgkL7rrkdtQXTuetOEyJHFNJ8tiAbxt5MeNNLLFHeoUgt tCDRh+hu4CNKuZAO/jVdtpb/CMzLm/C22UiGgWjhFUHcfyHrJD0sls9LlBoFYA== From: Antero Mejr Date: Mon, 5 Jun 2023 00:07:55 +0000 Message-Id: <20230605000755.15416-1-antero@mailbox.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-MBO-RS-ID: b3596e229c2e7c6b068 X-MBO-RS-META: 16r5s7ywzt58b4716hrtwdh5pff1co48 Received-SPF: pass client-ip=2001:67c:2050:0:465::202; envelope-from=antero@mailbox.org; helo=mout-p-202.mailbox.org X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) * gnu/packages/plan9.scm (plan9port): New variable. --- gnu/packages/plan9.scm | 99 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 99 insertions(+) diff --git a/gnu/packages/plan9.scm b/gnu/packages/plan9.scm index 318344f2ec..747a1aaf64 100644 --- a/gnu/packages/plan9.scm +++ b/gnu/packages/plan9.scm @@ -20,8 +20,13 @@ (define-module (gnu packages plan9) #:use-module (guix build-system gnu) #:use-module (guix git-download) #:use-module (guix packages) + #:use-module (guix gexp) #:use-module (guix utils) #:use-module ((guix licenses) #:prefix license:) + #:use-module (gnu packages base) + #:use-module (gnu packages commencement) + #:use-module (gnu packages fontutils) + #:use-module (gnu packages perl) #:use-module (gnu packages xorg)) (define-public drawterm @@ -63,3 +68,97 @@ (define-public drawterm Plan 9 systems. It behaves like a Plan 9 kernel and will attempt to reconstruct a Plan 9 terminal-like experience from a non-Plan 9 system.") (license license:expat)))) + +(define-public plan9port + ;; no releases + (let ((commit "cc4571fec67407652b03d6603ada6580de2194dc") + (revision "0")) + (package + (name "plan9port") + (version (git-version "0.1.0" revision commit)) + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/9fans/plan9port") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1g2kzlghcghs560na6xalfsjq5zwp015wv9wk8wxn26981zs759x")) + (modules '((guix build utils))) + (snippet #~(for-each delete-file-recursively + '("font/luc" ;nonfree + "font/lucm" + "font/lucsans" + "font/pelm"))))) + (build-system gnu-build-system) + (arguments + (list #:tests? #f ;no tests + #:phases #~(modify-phases %standard-phases + (add-after 'unpack 'setup + (lambda _ + (delete-file "src/cmd/mk/mk.pdf") + (substitute* "src/cmd/acme/acme.c" + (("/lib/font/bit/lucsans/euro.8.font") + (string-append + #$output + "/font/fixed/unicode.5x8.font")) + (("/lib/font/bit/lucm/unicode.9.font") + (string-append + #$output + "/font/fixed/unicode.6x9.font"))) + (substitute* (find-files "src") + (("/lib/font/bit") + (string-append #$output "/font"))) + (substitute* "bin/9c" + (("which") (which "which"))) + (substitute* "src/cmd/fontsrv/freetyperules.sh" + (("'\\$i'/freetype2") + (string-append "-I" #$freetype + "/include/freetype2"))) + (with-output-to-file "LOCAL.config" + (lambda _ + (format #t "CC9=~a~%" #$(cc-for-target)) + (format #t "FONTSRV=fontsrv~%"))) + (setenv "X11" #$libx11) + (setenv "PLAN9" (getcwd)) + (setenv "PLAN9_TARGET" #$output))) + (delete 'configure) ;no configure + (replace 'build + (lambda _ + (invoke "./INSTALL" "-b"))) + (replace 'install + (lambda _ + (for-each + (lambda (x) + (let ((out (string-append #$output "/" x))) + (mkdir-p out) + (copy-recursively x out))) + ;; TODO: use external sky and dict packages + '("bin" "face" "font" "include" "lib" "lp" + "mail" "man" "ndb" "plumb" "tmac" "troff" + "postscript")) + (install-file "rcmain" #$output))) + (add-after 'install 'wrap-executables + (lambda _ + (for-each + (lambda (exe) + (wrap-program exe + `("PLAN9" ":" prefix (,#$output)))) + (find-files (string-append #$output "/bin"))))) + ;; Plan9 doesn't compress man pages + (delete 'compress-documentation)))) + (native-inputs (list perl which)) + (inputs (list fontconfig libx11 libxext libxt)) + ;; Propagate gcc-toolchain because some programs, like the 9c compiler, + ;; are just aliased scripts to gcc equivalents. + (propagated-inputs (list gcc-toolchain)) + (home-page "https://9fans.github.io/plan9port/") + (synopsis "Port of many Plan 9 libraries and programs") + (description + "Plan 9 from User Space (aka plan9port) is a port of many Plan 9 +programs from their native Plan 9 environment to Unix-like operating +systems.") + (license (list license:expat ;modifications + license:lpl1.02 ;original Plan9 code + license:zlib))))) ;src/cmd/bzip2 -- 2.39.2 From unknown Thu Jun 19 14:31:34 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Antero Mejr Subject: bug#63898: closed (Re: bug#63898: [PATCH] gnu: Add plan9port.) Message-ID: References: <87cz1by5fp.fsf@gnu.org> <20230605000755.15416-1-antero@mailbox.org> X-Gnu-PR-Message: they-closed 63898 X-Gnu-PR-Package: guix-patches X-Gnu-PR-Keywords: patch Reply-To: 63898@debbugs.gnu.org Date: Sat, 01 Jul 2023 16:15:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1688228102-24896-1" This is a multi-part message in MIME format... ------------=_1688228102-24896-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #63898: [PATCH] gnu: Add plan9port. which was filed against the guix-patches package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 63898@debbugs.gnu.org. --=20 63898: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D63898 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1688228102-24896-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 63898-done) by debbugs.gnu.org; 1 Jul 2023 16:15:01 +0000 Received: from localhost ([127.0.0.1]:58551 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qFdFU-0006TE-EA for submit@debbugs.gnu.org; Sat, 01 Jul 2023 12:15:00 -0400 Received: from eggs.gnu.org ([209.51.188.92]:57024) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qFdFS-0006T1-RJ for 63898-done@debbugs.gnu.org; Sat, 01 Jul 2023 12:14:59 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qFdFM-0000dr-Il; Sat, 01 Jul 2023 12:14:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=TEq4esQktvjFAbjEUpoS77teGtXqzhbuEldbb4LwLvs=; b=GxDWU5zKb7mt7/s5nj7G KliSFk5Jgd7ATxqQle6KzpfEkhFCezMswa67ZIe8tkPvnvso+ddSQz8nlQXDzXTDnZuNridaNuw7B 7yn+GfMce145NYJAVcNXSAO4YtIEOFOD6nxnYlmgvaBXnsC2NIpQb5Z3n8hAId/BjDO+mf/3QFz7E xO+gWWK25m/dOUhp26tyHLTIFoaY7xjMoORAnGMbvcd0YaZjA5EOdUMx31hi3PO6TucHWPzIStfZ5 Z9psoV3DlQMyS+aoNjPi4Fvet+4kFb9/BHwiAArZXV++V3wH3LrdkMmtvMNCMOWoZBE9wrQgkbcgO CzNwjzJRzBi5aA==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201] helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qFdFM-0001kE-6N; Sat, 01 Jul 2023 12:14:52 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Antero Mejr Subject: Re: bug#63898: [PATCH] gnu: Add plan9port. References: <20230605000755.15416-1-antero@mailbox.org> Date: Sat, 01 Jul 2023 18:14:50 +0200 In-Reply-To: <20230605000755.15416-1-antero@mailbox.org> (Antero Mejr's message of "Mon, 5 Jun 2023 00:07:55 +0000") Message-ID: <87cz1by5fp.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 63898-done Cc: 63898-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi, Antero Mejr skribis: > * gnu/packages/plan9.scm (plan9port): New variable. Applied after addressing =E2=80=98lint=E2=80=99 warnings (tabs, missing =E2= =80=98bash-minimal=E2=80=99 input) and adding a copyright line for you. Thanks, Ludo=E2=80=99. --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable diff --git a/gnu/packages/plan9.scm b/gnu/packages/plan9.scm index 747a1aaf64..f78c26e215 100644 --- a/gnu/packages/plan9.scm +++ b/gnu/packages/plan9.scm @@ -1,5 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright =C2=A9 2021 =E5=AE=8B=E6=96=87=E6=AD=A6 +;;; Copyright =C2=A9 2023 Antero Mejr ;;; ;;; This file is part of GNU Guix. ;;; @@ -24,6 +25,7 @@ (define-module (gnu packages plan9) #:use-module (guix utils) #:use-module ((guix licenses) #:prefix license:) #:use-module (gnu packages base) + #:use-module (gnu packages bash) #:use-module (gnu packages commencement) #:use-module (gnu packages fontutils) #:use-module (gnu packages perl) @@ -72,84 +74,96 @@ (define-public drawterm (define-public plan9port ;; no releases (let ((commit "cc4571fec67407652b03d6603ada6580de2194dc") - (revision "0")) + (revision "0")) (package (name "plan9port") (version (git-version "0.1.0" revision commit)) (source (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/9fans/plan9port") - (commit commit))) - (file-name (git-file-name name version)) - (sha256 - (base32 - "1g2kzlghcghs560na6xalfsjq5zwp015wv9wk8wxn26981zs759x")) - (modules '((guix build utils))) - (snippet #~(for-each delete-file-recursively - '("font/luc" ;nonfree - "font/lucm" - "font/lucsans" - "font/pelm"))))) + (method git-fetch) + (uri (git-reference + (url "https://github.com/9fans/plan9port") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1g2kzlghcghs560na6xalfsjq5zwp015wv9wk8wxn26981zs759x")) + (modules '((guix build utils))) + (snippet #~(for-each delete-file-recursively + '("font/luc" ;nonfree + "font/lucm" "font/lucsans" "font/pe= lm"))))) (build-system gnu-build-system) (arguments (list #:tests? #f ;no tests - #:phases #~(modify-phases %standard-phases + #:phases #~(modify-phases %standard-phases (add-after 'unpack 'setup (lambda _ (delete-file "src/cmd/mk/mk.pdf") (substitute* "src/cmd/acme/acme.c" (("/lib/font/bit/lucsans/euro.8.font") - (string-append - #$output + (string-append #$output "/font/fixed/unicode.5x8.font")) (("/lib/font/bit/lucm/unicode.9.font") - (string-append - #$output + (string-append #$output "/font/fixed/unicode.6x9.font"))) (substitute* (find-files "src") (("/lib/font/bit") (string-append #$output "/font"))) - (substitute* "bin/9c" - (("which") (which "which"))) + (substitute* "bin/9c" + (("which") + (which "which"))) (substitute* "src/cmd/fontsrv/freetyperules.= sh" - (("'\\$i'/freetype2") - (string-append "-I" #$freetype - "/include/freetype2"))) + (("'\\$i'/freetype2") + (string-append "-I" + #$freetype + "/include/freetype2"))) (with-output-to-file "LOCAL.config" - (lambda _ - (format #t "CC9=3D~a~%" #$(cc-for-target)) - (format #t "FONTSRV=3Dfontsrv~%"))) - (setenv "X11" #$libx11) - (setenv "PLAN9" (getcwd)) - (setenv "PLAN9_TARGET" #$output))) + (lambda _ + (format #t "CC9=3D~a~%" #$(cc-for-target= )) + (format #t "FONTSRV=3Dfontsrv~%"))) + (setenv "X11" + #$libx11) + (setenv "PLAN9" + (getcwd)) + (setenv "PLAN9_TARGET" + #$output))) (delete 'configure) ;no configure - (replace 'build - (lambda _ + (replace 'build + (lambda _ (invoke "./INSTALL" "-b"))) - (replace 'install - (lambda _ - (for-each - (lambda (x) - (let ((out (string-append #$output "/" x)= )) - (mkdir-p out) - (copy-recursively x out))) - ;; TODO: use external sky and dict packages - '("bin" "face" "font" "include" "lib" "lp" - "mail" "man" "ndb" "plumb" "tmac" "troff" - "postscript")) + (replace 'install + (lambda _ + (for-each (lambda (x) + (let ((out (string-append #$outp= ut + "/" x)= )) + (mkdir-p out) + (copy-recursively x out))) + ;; TODO: use external sky and dict= packages + '("bin" "face" + "font" + "include" + "lib" + "lp" + "mail" + "man" + "ndb" + "plumb" + "tmac" + "troff" + "postscript")) (install-file "rcmain" #$output))) - (add-after 'install 'wrap-executables - (lambda _ - (for-each - (lambda (exe) - (wrap-program exe - `("PLAN9" ":" prefix (,#$output)))) - (find-files (string-append #$output "/bin"))))) + (add-after 'install 'wrap-executables + (lambda _ + (for-each (lambda (exe) + (wrap-program exe + `("PLAN9" ":" prefix + (,#$output)))) + (find-files + (string-append #$output "/bin")))= )) ;; Plan9 doesn't compress man pages - (delete 'compress-documentation)))) + (delete 'compress-documentation)))) (native-inputs (list perl which)) - (inputs (list fontconfig libx11 libxext libxt)) + (inputs (list bash-minimal ;for 'wrap-program' + fontconfig libx11 libxext libxt)) ;; Propagate gcc-toolchain because some programs, like the 9c compil= er, ;; are just aliased scripts to gcc equivalents. (propagated-inputs (list gcc-toolchain)) @@ -161,4 +175,4 @@ (define-public plan9port systems.") (license (list license:expat ;modifications license:lpl1.02 ;original Plan9 code - license:zlib))))) ;src/cmd/bzip2 + license:zlib))))) ;src/cmd/bzip2 --=-=-=-- ------------=_1688228102-24896-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 5 Jun 2023 00:08:17 +0000 Received: from localhost ([127.0.0.1]:47578 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q5xlg-0005jC-Be for submit@debbugs.gnu.org; Sun, 04 Jun 2023 20:08:16 -0400 Received: from lists.gnu.org ([209.51.188.17]:42376) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q5xle-0005j2-Nm for submit@debbugs.gnu.org; Sun, 04 Jun 2023 20:08:15 -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 1q5xlb-0000zp-Ow for guix-patches@gnu.org; Sun, 04 Jun 2023 20:08:13 -0400 Received: from mout-p-202.mailbox.org ([2001:67c:2050:0:465::202]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_CHACHA20_POLY1305:256) (Exim 4.90_1) (envelope-from ) id 1q5xlY-0003eU-04 for guix-patches@gnu.org; Sun, 04 Jun 2023 20:08:09 -0400 Received: from smtp202.mailbox.org (smtp202.mailbox.org [IPv6:2001:67c:2050:b231:465::202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-202.mailbox.org (Postfix) with ESMTPS id 4QZDTG2HhZz9sGf for ; Mon, 5 Jun 2023 02:08:02 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1685923682; 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; bh=A48oncfahcQBD3k8uifIwyUdmpKiUJZysA7Vvx/aKv4=; b=i6noQ0I9XfxFNLjnYYJOtGCrhY9t0jYdWQg6ohxGEuRXd08dU8z7mCVm6rq1K3n5Acc5Qy AjOwkB8i4Aq7koQb3MVSESLMAj/fLGSGRNARE+4yD5+meciJV8Dz+wfWz0B7dYjT1945ON xq0K8C4s/M/Atx2c2LMsbP+9OwEF3CkJTqx2tP/eEjeRhCo2op9MhlfTmzIzC/oSSEXU/w QRbjxD+HuTE/8WPvlJbbo2GtwtgkL7rrkdtQXTuetOEyJHFNJ8tiAbxt5MeNNLLFHeoUgt tCDRh+hu4CNKuZAO/jVdtpb/CMzLm/C22UiGgWjhFUHcfyHrJD0sls9LlBoFYA== From: Antero Mejr To: guix-patches@gnu.org Subject: [PATCH] gnu: Add plan9port. Date: Mon, 5 Jun 2023 00:07:55 +0000 Message-Id: <20230605000755.15416-1-antero@mailbox.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-MBO-RS-ID: b3596e229c2e7c6b068 X-MBO-RS-META: 16r5s7ywzt58b4716hrtwdh5pff1co48 Received-SPF: pass client-ip=2001:67c:2050:0:465::202; envelope-from=antero@mailbox.org; helo=mout-p-202.mailbox.org X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) * gnu/packages/plan9.scm (plan9port): New variable. --- gnu/packages/plan9.scm | 99 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 99 insertions(+) diff --git a/gnu/packages/plan9.scm b/gnu/packages/plan9.scm index 318344f2ec..747a1aaf64 100644 --- a/gnu/packages/plan9.scm +++ b/gnu/packages/plan9.scm @@ -20,8 +20,13 @@ (define-module (gnu packages plan9) #:use-module (guix build-system gnu) #:use-module (guix git-download) #:use-module (guix packages) + #:use-module (guix gexp) #:use-module (guix utils) #:use-module ((guix licenses) #:prefix license:) + #:use-module (gnu packages base) + #:use-module (gnu packages commencement) + #:use-module (gnu packages fontutils) + #:use-module (gnu packages perl) #:use-module (gnu packages xorg)) (define-public drawterm @@ -63,3 +68,97 @@ (define-public drawterm Plan 9 systems. It behaves like a Plan 9 kernel and will attempt to reconstruct a Plan 9 terminal-like experience from a non-Plan 9 system.") (license license:expat)))) + +(define-public plan9port + ;; no releases + (let ((commit "cc4571fec67407652b03d6603ada6580de2194dc") + (revision "0")) + (package + (name "plan9port") + (version (git-version "0.1.0" revision commit)) + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/9fans/plan9port") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1g2kzlghcghs560na6xalfsjq5zwp015wv9wk8wxn26981zs759x")) + (modules '((guix build utils))) + (snippet #~(for-each delete-file-recursively + '("font/luc" ;nonfree + "font/lucm" + "font/lucsans" + "font/pelm"))))) + (build-system gnu-build-system) + (arguments + (list #:tests? #f ;no tests + #:phases #~(modify-phases %standard-phases + (add-after 'unpack 'setup + (lambda _ + (delete-file "src/cmd/mk/mk.pdf") + (substitute* "src/cmd/acme/acme.c" + (("/lib/font/bit/lucsans/euro.8.font") + (string-append + #$output + "/font/fixed/unicode.5x8.font")) + (("/lib/font/bit/lucm/unicode.9.font") + (string-append + #$output + "/font/fixed/unicode.6x9.font"))) + (substitute* (find-files "src") + (("/lib/font/bit") + (string-append #$output "/font"))) + (substitute* "bin/9c" + (("which") (which "which"))) + (substitute* "src/cmd/fontsrv/freetyperules.sh" + (("'\\$i'/freetype2") + (string-append "-I" #$freetype + "/include/freetype2"))) + (with-output-to-file "LOCAL.config" + (lambda _ + (format #t "CC9=~a~%" #$(cc-for-target)) + (format #t "FONTSRV=fontsrv~%"))) + (setenv "X11" #$libx11) + (setenv "PLAN9" (getcwd)) + (setenv "PLAN9_TARGET" #$output))) + (delete 'configure) ;no configure + (replace 'build + (lambda _ + (invoke "./INSTALL" "-b"))) + (replace 'install + (lambda _ + (for-each + (lambda (x) + (let ((out (string-append #$output "/" x))) + (mkdir-p out) + (copy-recursively x out))) + ;; TODO: use external sky and dict packages + '("bin" "face" "font" "include" "lib" "lp" + "mail" "man" "ndb" "plumb" "tmac" "troff" + "postscript")) + (install-file "rcmain" #$output))) + (add-after 'install 'wrap-executables + (lambda _ + (for-each + (lambda (exe) + (wrap-program exe + `("PLAN9" ":" prefix (,#$output)))) + (find-files (string-append #$output "/bin"))))) + ;; Plan9 doesn't compress man pages + (delete 'compress-documentation)))) + (native-inputs (list perl which)) + (inputs (list fontconfig libx11 libxext libxt)) + ;; Propagate gcc-toolchain because some programs, like the 9c compiler, + ;; are just aliased scripts to gcc equivalents. + (propagated-inputs (list gcc-toolchain)) + (home-page "https://9fans.github.io/plan9port/") + (synopsis "Port of many Plan 9 libraries and programs") + (description + "Plan 9 from User Space (aka plan9port) is a port of many Plan 9 +programs from their native Plan 9 environment to Unix-like operating +systems.") + (license (list license:expat ;modifications + license:lpl1.02 ;original Plan9 code + license:zlib))))) ;src/cmd/bzip2 -- 2.39.2 ------------=_1688228102-24896-1--