diff mbox series

[bug#55423] : gnu: Add mogan.

Message ID 86wnen5vl3.fsf@163.com
State New
Headers show
Series [bug#55423] : gnu: Add mogan. | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch fail View Laminar job
cbaines/issue success View issue

Commit Message

Zhu Zihao May 15, 2022, 3:21 a.m. UTC

Comments

M May 15, 2022, 11:57 a.m. UTC | #1
Zhu Zihao schreef op zo 15-05-2022 om 11:21 [+0800]:
> +    (home-page "https://gitee.com/XmacsLabs/mogan")))

Appears to be a mirror for <https://github.com/XmacsLabs/mogan>.

Also, what kind of fork is this?  Is the idea to (eventually) merge the
fixes and features into upstream, or are they going separate ways, or
...?  Basically, why package the fork (which comes with some technical
and social cost) instead of working with upstream?

Not saying it's forbidden to package forks, but rather for me the
default option is to only package upstream.

> + Its goal is to customize GNU TeXmacs for everyone to enjoy it
> + fluently and develop new feature for everyone to learn and create
> + science and technology.

This description sort-of suggests TeXmacs doesn't want everyone to
enjoy it and such, which I don't think is good for relations with
upstream.  Maybe like ‘(guix)Synopsis and Descriptions’ suggests, write
about some use cases and features (that were added by the fork)?

Greetings,
Maxime.
M May 15, 2022, 11:58 a.m. UTC | #2
Zhu Zihao schreef op zo 15-05-2022 om 11:21 [+0800]:
> +            (replace 'gzip-flags
> +              (lambda _
> +                (substitute* "misc/CMakeLists.txt"
> +                  (("COMMAND gzip" all)
> +                   (string-append all " -n")))))))))

-n = for no time stamp and reproducibility?  I recommend sending this
change to upstream (if accepted by them), such that every distribution
benefits.

Greetings,
Maxime.
M May 15, 2022, 11:59 a.m. UTC | #3
Zhu Zihao schreef op zo 15-05-2022 om 11:21 [+0800]:
> +    (inputs
> +     (modify-inputs (package-inputs texmacs)
> +       ;; Replaced by S7 scheme
> +       (delete "guile")
> +       (prepend curl)))

S7 scheme appears to be missing in the inputs, is it bundled?

Greetings,
Maxime.
M May 15, 2022, 12:01 p.m. UTC | #4
Zhu Zihao schreef op zo 15-05-2022 om 11:21 [+0800]:
> +    (inputs
> +     (modify-inputs (package-inputs texmacs)
> +       ;; Replaced by S7 scheme
> +       (delete "guile")
> +       (prepend curl)))

S7 is bundled in
<https://github.com/XmacsLabs/mogan/tree/main/src/Scheme/S7>.
Zhu Zihao May 15, 2022, 1:56 p.m. UTC | #5
Maxime Devos <maximedevos@telenet.be> writes:

> [[PGP Signed Part:Undecided]]
> Zhu Zihao schreef op zo 15-05-2022 om 11:21 [+0800]:
>> +    (home-page "https://gitee.com/XmacsLabs/mogan")))
>
> Appears to be a mirror for <https://github.com/XmacsLabs/mogan>.

These two repositories are equal with each others. There's no "main"
repository and "mirror" repository difference. 

> Also, what kind of fork is this?  Is the idea to (eventually) merge the
> fixes and features into upstream, or are they going separate ways, or
> ...?  Basically, why package the fork (which comes with some technical
> and social cost) instead of working with upstream?
>
> Not saying it's forbidden to package forks, but rather for me the
> default option is to only package upstream.

This fork is created by Darcy Shen(sadhen), the maintainer of GNU
TeXmacs. IIUC, Shen feels GNU TeXmacs is more scientist oriented, so he
want Mogan to be programmer oriented[*]. For details, we'd better to ask
Shen directly.

I guess Shen is unhappy with the slow development progress of texmacs,
he created a fork to add the features he wanted to add to texmacs.

[*]: https://zhuanlan.zhihu.com/p/447372210 (Simplified Chinese)
>
>> + Its goal is to customize GNU TeXmacs for everyone to enjoy it
>> + fluently and develop new feature for everyone to learn and create
>> + science and technology.
>
> This description sort-of suggests TeXmacs doesn't want everyone to
> enjoy it and such, which I don't think is good for relations with
> upstream.  Maybe like ‘(guix)Synopsis and Descriptions’ suggests, write
> about some use cases and features (that were added by the fork)?

OK, I'll change it to more netural words.
>
> Greetings,
> Maxime.
>
> [[End of PGP Signed Part]]
Zhu Zihao May 15, 2022, 2:05 p.m. UTC | #6
Maxime Devos <maximedevos@telenet.be> writes:

> [[PGP Signed Part:Undecided]]
> Zhu Zihao schreef op zo 15-05-2022 om 11:21 [+0800]:
>> +            (replace 'gzip-flags
>> +              (lambda _
>> +                (substitute* "misc/CMakeLists.txt"
>> +                  (("COMMAND gzip" all)
>> +                   (string-append all " -n")))))))))
>
> -n = for no time stamp and reproducibility?  I recommend sending this
> change to upstream (if accepted by them), such that every distribution
> benefits.

I'll suggest a patch to upstream. But I think we don't need these phase
at all. There's reset-gzip-timestamps in gnu-build-system and the
timestamp of all gzip files will be cleared in the build process.

> S7 scheme appears to be missing in the inputs, is it bundled?

Yes, it's bundled. But I don't have a plan to unbundle it. It's small
and we'll have more work to do if we try to unbundle.
Zhu Zihao May 15, 2022, 2:12 p.m. UTC | #7
Hello, Darcy Shen!

We're planning to package mogan editor for Guix. Thanks for your work on
Mogan and GNU TeXmacs!

Please allow me to ask a question here: What's your motivation of
forking GNU TeXmacs to create Mogan?

So Guix developers don't know the difference between GNU TeXmacs and
Mogan and many articles about Mogan were written in Chinese. So we need
your help. Thank you very much.
M May 15, 2022, 2:24 p.m. UTC | #8
Zhu Zihao schreef op zo 15-05-2022 om 22:05 [+0800]:
> Yes, it's bundled. But I don't have a plan to unbundle it. It's small
> and we'll have more work to do if we try to unbundle. 

From (guix)Synopses and Descriptions:

  8. Make sure the package does not use bundled copies of software
     already available as separate packages.

     Sometimes, packages include copies of the source code of their
     dependencies as a convenience for users.  However, as a
     distribution, we want to make sure that such packages end up using
     the copy we already have in the distribution, if there is one.
     This improves resource usage (the dependency is built and stored
     only once), and allows the distribution to make transverse changes
     such as applying security updates for a given software package in
     a single place and have them affect the whole system—something
     that bundled copies prevent.

I don't think resource usage is a problem here, but the security
updates and transverse changes bits seem relevant here to me
(also: bug fixes, less redundancy when checking source code for malware
or bugs, replacing the s7 used by applications by a custom one to test
out new features or performance or such, ...)

It's a bit of an investment now that gives some flexibility for the
future and avoids some potential problems (e.g. malware bit and
security updates bit).

Greetings,
Maxime.
Darcy Shen May 16, 2022, 10:39 a.m. UTC | #9
Because GNU TeXmacs is still using GNU Guile 1.8.x and Qt 4.x.



As one of the developers, I want to use S7 Scheme and Qt 5.x. That's the reason why I fork GNU TeXmacs.







---- On Sun, 15 May 2022 22:12:27 +0800 Zhu Zihao <all_but_last@163.com> wrote ----



Hello, Darcy Shen! 
 
We're planning to package mogan editor for Guix. Thanks for your work on 
Mogan and GNU TeXmacs! 
 
Please allow me to ask a question here: What's your motivation of 
forking GNU TeXmacs to create Mogan? 
 
So Guix developers don't know the difference between GNU TeXmacs and 
Mogan and many articles about Mogan were written in Chinese. So we need 
your help. Thank you very much.
diff mbox series

Patch

From 888d590bc6d27fe43456ee636265915e46a81a3b Mon Sep 17 00:00:00 2001
From: Zhu Zihao <all_but_last@163.com>
Date: Sat, 14 May 2022 22:19:06 +0800
Subject: [PATCH 2/2] gnu: Add mogan.

* gnu/packages/text-editors.scm (mogan): New variable.
---
 gnu/packages/text-editors.scm | 36 +++++++++++++++++++++++++++++++++++
 1 file changed, 36 insertions(+)

diff --git a/gnu/packages/text-editors.scm b/gnu/packages/text-editors.scm
index d4459f5579..7759bfde41 100644
--- a/gnu/packages/text-editors.scm
+++ b/gnu/packages/text-editors.scm
@@ -55,6 +55,7 @@  (define-module (gnu packages text-editors)
   #:use-module (gnu packages code)
   #:use-module (gnu packages cpp)
   #:use-module (gnu packages crates-io)
+  #:use-module (gnu packages curl)
   #:use-module (gnu packages documentation)
   #:use-module (gnu packages fontutils)
   #:use-module (gnu packages freedesktop)
@@ -899,6 +900,41 @@  (define-public texmacs
     (license license:gpl3+)
     (home-page "https://www.texmacs.org/tmweb/home/welcome.en.html")))
 
+(define-public mogan
+  (package
+    (inherit texmacs)
+    (name "mogan")
+    (version "1.0.2")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://gitee.com/XmacsLabs/mogan")
+             (commit (string-append "v" version))))
+       (sha256
+        (base32 "0flk12yic6jc996jqsmmd0wp40js04rdpvcdjkri0hbqrcvyni8v"))))
+    (inputs
+     (modify-inputs (package-inputs texmacs)
+       ;; Replaced by S7 scheme
+       (delete "guile")
+       (prepend curl)))
+    (arguments
+     (substitute-keyword-arguments (package-arguments texmacs)
+       ((#:phases orig)
+        #~(modify-phases #$orig
+            (replace 'gzip-flags
+              (lambda _
+                (substitute* "misc/CMakeLists.txt"
+                  (("COMMAND gzip" all)
+                   (string-append all " -n")))))))))
+    (synopsis "Structural editor delivered by Xmacs Labs")
+    (description
+     "Mogan is a fork of GNU TeXmacs created by Xmacs Labs. Its goal is
+to customize GNU TeXmacs for everyone to enjoy it fluently and develop new
+feature for everyone to learn and create science and technology.")
+    (license license:gpl3+)
+    (home-page "https://gitee.com/XmacsLabs/mogan")))
+
 (define-public scintilla
   (package
     (name "scintilla")
-- 
2.36.0