GNU bug report logs - #63898
[PATCH] gnu: Add plan9port.

Previous Next

Package: guix-patches;

Reported by: Antero Mejr <antero <at> mailbox.org>

Date: Mon, 5 Jun 2023 00:09:01 UTC

Severity: normal

Tags: patch

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#63898: closed ([PATCH] gnu: Add plan9port.)
Date: Sat, 01 Jul 2023 16:15:02 +0000
[Message part 1 (text/plain, inline)]
Your message dated Sat, 01 Jul 2023 18:14:50 +0200
with message-id <87cz1by5fp.fsf <at> gnu.org>
and subject line Re: bug#63898: [PATCH] gnu: Add plan9port.
has caused the debbugs.gnu.org bug report #63898,
regarding [PATCH] gnu: Add plan9port.
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
63898: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=63898
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Antero Mejr <antero <at> mailbox.org>
To: guix-patches <at> gnu.org
Subject: [PATCH] gnu: Add plan9port.
Date: Mon,  5 Jun 2023 00:07:55 +0000
* 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



[Message part 3 (message/rfc822, inline)]
From: Ludovic Courtès <ludo <at> gnu.org>
To: Antero Mejr <antero <at> mailbox.org>
Cc: 63898-done <at> debbugs.gnu.org
Subject: Re: bug#63898: [PATCH] gnu: Add plan9port.
Date: Sat, 01 Jul 2023 18:14:50 +0200
[Message part 4 (text/plain, inline)]
Hi,

Antero Mejr <antero <at> mailbox.org> skribis:

> * gnu/packages/plan9.scm (plan9port): New variable.

Applied after addressing ‘lint’ warnings (tabs, missing ‘bash-minimal’
input) and adding a copyright line for you.

Thanks,
Ludo’.

[Message part 5 (text/x-patch, inline)]
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 © 2021 宋文武 <iyzsong <at> member.fsf.org>
+;;; Copyright © 2023 Antero Mejr <antero <at> mailbox.org>
 ;;;
 ;;; 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/pelm")))))
       (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=~a~%" #$(cc-for-target))
-	                          (format #t "FONTSRV=fontsrv~%")))
-                              (setenv "X11" #$libx11)
-                              (setenv "PLAN9" (getcwd))
-                              (setenv "PLAN9_TARGET" #$output)))
+                                (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 _
+                          (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 #$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")))))
+                          (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 compiler,
       ;; 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

This bug report was last modified 1 year and 323 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.