[PATCH] gnu: Add fnc

  • Done
  • quality assurance status badge
Details
3 participants
  • ashish.is
  • Daniel Ziltener
  • Christopher Baines
Owner
unassigned
Submitted by
ashish.is
Severity
normal
A
A
ashish.is wrote on 15 Apr 22:25 +0200
(address . guix-patches@gnu.org)(name . Ashish SHUKLA)(address . ashish.is@lostca.se)
57b18e1298ae636df0fa11968978adcf227a0cab.1713212712.git.ashish.is@lostca.se
From: Ashish SHUKLA <ashish.is@lostca.se>

* gnu/packages/version-control.scm (fnc): New variable.

Change-Id: Idf1cb254c3ae18bacb86bf020511a5d34e2d3684
Signed-off-by: Ashish SHUKLA <ashish.is@lostca.se>
---
gnu/packages/version-control.scm | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)

Toggle diff (37 lines)
diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm
index 96ca1df552..33607940ec 100644
--- a/gnu/packages/version-control.scm
+++ b/gnu/packages/version-control.scm
@@ -4145,3 +4145,28 @@ (define-public git-sizer
(description "Compute various size metrics for a Git repository, flagging
those that might cause problems or inconvenience.")
(license license:expat)))
+
+(define-public fnc
+ (package
+ (name "fnc")
+ (version "0.16")
+ (source (origin
+ (method url-fetch)
+ (uri
+ (string-append "https://fnc.bsdbox.org/uv/dl/fnc-" version ".tar.gz"))
+ (sha256
+ (base32
+ "1npnbdz5i4p61ri76vx6awggbc0q19y8b26l3sy4wxmaxkly7gwy"))))
+ (build-system gnu-build-system)
+ (arguments
+ '(#:phases (modify-phases %standard-phases
+ (delete 'configure))
+ #:tests? #f
+ #:make-flags (list "CC=gcc"
+ (string-append "PREFIX=" (assoc-ref %outputs "out")))))
+ (inputs (list ncurses zlib sqlite-next))
+ (home-page "https://fnc.bsdbox.org")
+ (synopsis "Interactive text-based user interface for Fossil")
+ (description "fnc uses ncurses and libfossil to create a fossil ui experience in
+the terminal, and parse local changes at the hunk level to prepare atomic commits.")
+ (license license:isc)))

base-commit: a8353e9d6b34fd8d42d2e8f14ce844849fe9c293
--
2.41.0
D
D
Daniel Ziltener wrote on 16 Apr 00:11 +0200
QA review for 70407
180aae40-6597-9ae4-5533-3a410fc70348@lyrion.ch
user guix
usertag 70407 + reviewed-looks-good
thanks

Guix QA review form submission:


Items marked as checked: New package licenses, New package synopsis and
descriptions
C
C
Christopher Baines wrote on 17 Apr 00:21 +0200
Re: [bug#70407] [PATCH] gnu: Add fnc
87msptt0d5.fsf@cbaines.net
"ashish.is--- via Guix-patches" via <guix-patches@gnu.org> writes:

Toggle quote (38 lines)
> From: Ashish SHUKLA <ashish.is@lostca.se>
>
> * gnu/packages/version-control.scm (fnc): New variable.
>
> Change-Id: Idf1cb254c3ae18bacb86bf020511a5d34e2d3684
> Signed-off-by: Ashish SHUKLA <ashish.is@lostca.se>
> ---
> gnu/packages/version-control.scm | 25 +++++++++++++++++++++++++
> 1 file changed, 25 insertions(+)
>
> diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm
> index 96ca1df552..33607940ec 100644
> --- a/gnu/packages/version-control.scm
> +++ b/gnu/packages/version-control.scm
> @@ -4145,3 +4145,28 @@ (define-public git-sizer
> (description "Compute various size metrics for a Git repository, flagging
> those that might cause problems or inconvenience.")
> (license license:expat)))
> +
> +(define-public fnc
> + (package
> + (name "fnc")
> + (version "0.16")
> + (source (origin
> + (method url-fetch)
> + (uri
> + (string-append "https://fnc.bsdbox.org/uv/dl/fnc-" version ".tar.gz"))
> + (sha256
> + (base32
> + "1npnbdz5i4p61ri76vx6awggbc0q19y8b26l3sy4wxmaxkly7gwy"))))
> + (build-system gnu-build-system)
> + (arguments
> + '(#:phases (modify-phases %standard-phases
> + (delete 'configure))
> + #:tests? #f
> + #:make-flags (list "CC=gcc"
> + (string-append "PREFIX=" (assoc-ref %outputs "out")))))

The arguments needed a bit of touching up. Using gexp's is the new
style. It's unclear why the tests are disabled, I guess it's because
there are no tests so I've added a comment to this effect. Hardcoding
CC=gcc also causes problems for cross building, so use (cc-for-target)
instead.

Toggle quote (9 lines)
> + (inputs (list ncurses zlib sqlite-next))
> + (home-page "https://fnc.bsdbox.org")
> + (synopsis "Interactive text-based user interface for Fossil")
> + (description "fnc uses ncurses and libfossil to create a fossil ui experience in
> +the terminal, and parse local changes at the hunk level to prepare atomic commits.")
> + (license license:isc)))
>
> base-commit: a8353e9d6b34fd8d42d2e8f14ce844849fe9c293

I did have a quick check over the source, including a concatenated
sqlite seems unusual and not ideal, but I'm not quite sure how it's
used.

One final change I made was moving the package definition up off the
bottom of the file (as if everyone adds new packages there, it causes
merge conflicts).

I've pushed this to master with the changes I describe as
a45b2c7c63c6af9c42698e12b6809c41c0926de3 so please take a look.

Thanks,

Chris
-----BEGIN PGP SIGNATURE-----

iQKlBAEBCgCPFiEEPonu50WOcg2XVOCyXiijOwuE9XcFAmYe+eZfFIAAAAAALgAo
aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF
ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcRHG1haWxAY2Jh
aW5lcy5uZXQACgkQXiijOwuE9Xcbzg//RnDzOf8x5I7xLOMd1N6TiTythTxui+5r
HvT4cVq0ElzzPj/KAi2ITX/VbGKJ0/FoDL+pZJu9y6OfPmwUTr8uzcdGvtJmO7Yv
Kx7fsTde5EkpCGwWZo9GHepgoYIuGzVt+Jwk5vWnDfxsZAzD4E8+6b6ZHEfehXlQ
/ydJXJi0aZWpBwuPqQ5QNR0TqffOz2YELUAi25QD3VQSakQaSlkTEjj6PAM1Ve6B
t2K+zkATYfzzxj0opN1nOBSrEvwrYosTkrMz8zIYipvXNzxcyD6+8MAVfmjbJ7NA
eoTeqZNth4mKS3JK0+94dcbmWVPKaYb7sRpJg/bPR0ZGW+KapUBnyN+l5WmROfAk
6aU/o5MF9nfefeqgj7cDo86ffCBB3ioyhNfm2/KTVoXOr8/PCCygomcPhz2D76qz
aTMah8C+FTGHw6bSGbCCuVmDs68rC3+4Utjgt8B9xiBwg3FZ0F2I1xLKuuner6Tz
VsD3YWoX4fP7HkTBGQNmwjFxLp5jM8/qUp6e5yu8i0bGeCt7JxVxfQyj/n9k9cpm
dj7sdUT9Y3Zhp+0TF9VmB7u7WbMa/ekCtpKxg7G9AhbK94DSV2VhH8ZQacLr5f7O
RsnRppbCV2F/tFkBtX0P7cGxI02mr1TKzQY5tNFr82+KmBsfi4HFGjlNPq0rJKJ0
xtpeAHOysHM=
=MunI
-----END PGP SIGNATURE-----

Closed
A
A
Ashish wrote on 17 Apr 11:25 +0200
(name . Christopher Baines)(address . mail@cbaines.net)
rx5ve7ioah3xsau6xzxc2slohnp5bgmvaehfiwhxreaskgrwbn@p33iit6nahvl
On Tue, Apr 16, 2024 at 11:21:26PM +0100, Christopher Baines wrote:
Toggle quote (46 lines)
> "ashish.is--- via Guix-patches" via <guix-patches@gnu.org> writes:
>
> > From: Ashish SHUKLA <ashish.is@lostca.se>
> >
> > * gnu/packages/version-control.scm (fnc): New variable.
> >
> > Change-Id: Idf1cb254c3ae18bacb86bf020511a5d34e2d3684
> > Signed-off-by: Ashish SHUKLA <ashish.is@lostca.se>
> > ---
> > gnu/packages/version-control.scm | 25 +++++++++++++++++++++++++
> > 1 file changed, 25 insertions(+)
> >
> > diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm
> > index 96ca1df552..33607940ec 100644
> > --- a/gnu/packages/version-control.scm
> > +++ b/gnu/packages/version-control.scm
> > @@ -4145,3 +4145,28 @@ (define-public git-sizer
> > (description "Compute various size metrics for a Git repository, flagging
> > those that might cause problems or inconvenience.")
> > (license license:expat)))
> > +
> > +(define-public fnc
> > + (package
> > + (name "fnc")
> > + (version "0.16")
> > + (source (origin
> > + (method url-fetch)
> > + (uri
> > + (string-append "https://fnc.bsdbox.org/uv/dl/fnc-" version ".tar.gz"))
> > + (sha256
> > + (base32
> > + "1npnbdz5i4p61ri76vx6awggbc0q19y8b26l3sy4wxmaxkly7gwy"))))
> > + (build-system gnu-build-system)
> > + (arguments
> > + '(#:phases (modify-phases %standard-phases
> > + (delete 'configure))
> > + #:tests? #f
> > + #:make-flags (list "CC=gcc"
> > + (string-append "PREFIX=" (assoc-ref %outputs "out")))))
>
> The arguments needed a bit of touching up. Using gexp's is the new
> style. It's unclear why the tests are disabled, I guess it's because
> there are no tests so I've added a comment to this effect. Hardcoding
> CC=gcc also causes problems for cross building, so use (cc-for-target)
> instead.

Thanks for catching this, it indeed crossed my mind, but I was not sure what to replace it with should someone chose to build with `clang' (or other C language compiler), and `cc' is not present.

Toggle quote (13 lines)
> > + (inputs (list ncurses zlib sqlite-next))
> > + (home-page "https://fnc.bsdbox.org")
> > + (synopsis "Interactive text-based user interface for Fossil")
> > + (description "fnc uses ncurses and libfossil to create a fossil ui experience in
> > +the terminal, and parse local changes at the hunk level to prepare atomic commits.")
> > + (license license:isc)))
> >
> > base-commit: a8353e9d6b34fd8d42d2e8f14ce844849fe9c293
>
> I did have a quick check over the source, including a concatenated
> sqlite seems unusual and not ideal, but I'm not quite sure how it's
> used.

libfossil is a library implementation of fossil ships with bundled sqlite3, and the author decide to bundle libfossil, and so sqlite3 comes with it.

Toggle quote (12 lines)
>
> One final change I made was moving the package definition up off the
> bottom of the file (as if everyone adds new packages there, it causes
> merge conflicts).
>
> I've pushed this to master with the changes I describe as
> a45b2c7c63c6af9c42698e12b6809c41c0926de3 so please take a look.
>
> Thanks,
>
> Chris

Thanks!
--
Ashish | GPG: F682 CDCC 39DC 0FEA E116 20B6 C746 CFA9 E74F A4B0

"If I destroy you, what business is it of yours ?" (Dark Forest, Liu Cixin)
-----BEGIN PGP SIGNATURE-----

iQKTBAABCgB9FiEE9oLNzDncD+rhFiC2x0bPqedPpLAFAmYflY1fFIAAAAAALgAo
aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldEY2
ODJDRENDMzlEQzBGRUFFMTE2MjBCNkM3NDZDRkE5RTc0RkE0QjAACgkQx0bPqedP
pLBG/w/8C7zElodKXntITeFvcJXYuyI4oW9KufmGcfFWINWeb8szUvi3LmBCegn0
efVIFLRlfW4p46/GxvXzqL3xJUete4wKxwzar19aW7Oc4hAQ5cAb5v3+BNC3sH4a
s6OEZoPwVApJNxELK9Jgy01u2iUsN59rn1T7F87tGtqBk694dw1eNzkb5AtmSBVY
4v2NIkYpjHfhz4VdYSGDfxAgyabootFspsvfAPkGvPnyB7xMI+zwHbT7fqrfFxfU
BxVgWFwe9NrweGfcpbAyd90uZHs+QiL9NkPFihM3V52o0PVUTAqXIu7VTCa0+h1C
eANVjakxCklIY37BiGgOof7yNKBGSMO16qmR3DDGrMp7y6o+oYGA3OPPVr4ElYr2
qv1K693JpQU84+B2sVedvopPrT/XPsMLEcaVsTkbITXCoEjJXVtk6O940ezqbQTh
Lo3378lN2yHEdGOc6APgVxAPuiTZ/io6HhaoNLykVmWibTUgUT6j8uoxDr7BMlSq
ss8HOD2tBeb/3dEwryP6bC9LbrdKop4ff4y8fmVs/IY64g9UAxaauqXfF7IgA+gk
nTIoZrueI/HIfSKrsGQGrU96uPWsPUI4O6rj2RZiKQhyiliN8E5cbFw2rilkfjMo
uOt4zj1aajOsFFh6+kl49m1+Avauxt7PGzCyScqn6V0Ayn+UxuI=
=ejuW
-----END PGP SIGNATURE-----


Closed
C
C
Christopher Baines wrote on 17 Apr 12:51 +0200
Re: [bug#70407] [PATCH] gnu: Add fnc
(name . Ashish)(address . ashish.is@lostca.se)
87bk68tg7c.fsf@cbaines.net
Ashish <ashish.is@lostca.se> writes:

Toggle quote (20 lines)
> On Tue, Apr 16, 2024 at 11:21:26PM +0100, Christopher Baines wrote:
>> "ashish.is--- via Guix-patches" via <guix-patches@gnu.org> writes:
>>
>> > + (inputs (list ncurses zlib sqlite-next))
>> > + (home-page "https://fnc.bsdbox.org")
>> > + (synopsis "Interactive text-based user interface for Fossil")
>> > + (description "fnc uses ncurses and libfossil to create a fossil ui experience in
>> > +the terminal, and parse local changes at the hunk level to prepare atomic commits.")
>> > + (license license:isc)))
>> >
>> > base-commit: a8353e9d6b34fd8d42d2e8f14ce844849fe9c293
>>
>> I did have a quick check over the source, including a concatenated
>> sqlite seems unusual and not ideal, but I'm not quite sure how it's
>> used.
>
> libfossil is a library implementation of fossil ships with bundled
> sqlite3, and the author decide to bundle libfossil, and so sqlite3
> comes with it.

Right, it would be good to package libfossil and unbundle sqlite3 there,
then use that libfossil package here. If libfossil can't use the built
sqlite3 from Guix, then maybe the Guix package source can be used.
-----BEGIN PGP SIGNATURE-----

iQKlBAEBCgCPFiEEPonu50WOcg2XVOCyXiijOwuE9XcFAmYfqbdfFIAAAAAALgAo
aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF
ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcRHG1haWxAY2Jh
aW5lcy5uZXQACgkQXiijOwuE9XcehA//TUeJHtKR3xfpkWSBsNc2VCA2bDPaMAVw
MV1+6OOFK6jhmcH2LhR8/olMcQ1crtWyPHfLrjhvsjAr5wuxo1tUBu134dg972r4
Ug0hu12Kf/UhUFPI4tno5QboSwC6tOO0Io52s452mniQb4b8Nf5R0KisrLX0Av3f
3SD0w+Eb4+Dc6IapvSwUfZArxpkdOwHANeGHr9FLNxK4nhkGZladm+Dv9F4lLLuz
Qz4fzX+9T/llg4H/h+eW43rG6qVkav8NMvv1fhMev/HCGFHwv6v0UGwKltnftIa/
Kop1UskXoUgiiJc/9tEprrczbH+b/M7YgYbVu1REqV2gqxiBFL914Hhd2cCwXJfa
k2H3z0XAQX9Cil6g4ErTIi/x9KqKeRYJOnxiFlrO5iDg7Y2FZu9zHmg0NhJ3icJR
a9UXXzkFylXsxADmnm3J9TtPb8SbZRdip6rMBP9PU/SfUoWZTrU3mz4gyaav08Nr
uoGQ4+yLS6T6Q4rNRsZABoqbWWb97hjQ5611P0VStORc0UHwQPO2L1wpO1y+pVN8
6IxhImOO8o7ERAfmoHv9FbkmzZidJSGXAvoy8k2XDM1p6mUT1zMYhY/6njokukTj
uFHp1SuC75AxdDYmN5avkH8X2/dgi+Ge9qvlSlT54GX7P5MB0AXc9AFP1/8s5BOB
j5wcye/wU0o=
=YbDo
-----END PGP SIGNATURE-----

Closed
?