From: zimoun <zimon.toutoune@gmail.com>
To: jgart <jgart@dismail.de>, "Ludovic Courtès" <ludo@gnu.org>
Cc: Guix Devel <guix-devel@gnu.org>
Subject: Re: guix melpa mirror!
Date: Fri, 18 Nov 2022 09:20:25 +0100 [thread overview]
Message-ID: <86cz9kk71y.fsf@gmail.com> (raw)
In-Reply-To: <20221117190626.GB12202@dismail.de>
[-- Attachment #1: Type: text/plain, Size: 3346 bytes --]
Hi,
On Thu, 17 Nov 2022 at 19:06, jgart <jgart@dismail.de> wrote:
> I would love for guix to have very powerful automated package creation
> for all language ecosystems!
Well, it strongly depends on the quality of the targeted language
ecosystem. For some, they provide enough metadata to rely on for good
automatizing; for instance, R with CRAN or Bioconductor.
Sadly, for many others ecosystem, they (upstream) do not provide enough
metadata to automatically fill all the package fields. And some manual
tweaks are required.
For example, let count the number of packages that are tweaking their
’arguments’ fields (from ’#:tests? #f’ to complex phases modifications).
This is far from being a perfect metrics but it is a rough indication
about upstream quality: if they provide clean package respecting their
build system or if the package requires Guix adjustments.
Well, I get:
r : 2093 = 2093 = 1991 + 102
which is good (only ~5% require ’arguments’ tweaks), but
python : 2630 = 2630 = 803 + 1827
is bad (only ~31% do not require an ’arguments’ tweak).
About Emacs, it reads,
emacs : 1222 = 1222 = 874 + 348
From my point of view, it seems that it would be hard to have full
automated Emacs packaging for Guix. Well, it requires some work to find
some heuristics at importing (converting) time and that’s not
straightforward, IMHO.
Cheers,
simon
--8<---------------cut here---------------start------------->8---
$ guix repl -- arguments-vs-import.scm
key : tot = tot = no-arguments + arguments
ocaml : 57 = 57 = 0 + 57
haskell : 723 = 723 = 505 + 218
clojure : 11 = 11 = 0 + 11
qt : 226 = 226 = 98 + 128
copy : 105 = 105 = 1 + 104
maven : 1 = 1 = 0 + 1
node : 48 = 48 = 2 + 46
minetest-mod : 18 = 18 = 18 + 0
chicken : 9 = 9 = 0 + 9
emacs : 1222 = 1222 = 874 + 348
linux-module : 14 = 14 = 0 + 14
raw : 1 = 1 = 1 + 0
glib-or-gtk : 128 = 128 = 31 + 97
asdf/source : 659 = 659 = 553 + 106
dune : 226 = 226 = 39 + 187
go : 483 = 483 = 0 + 483
cmake : 1115 = 1115 = 92 + 1023
minify : 11 = 11 = 1 + 10
perl : 823 = 823 = 710 + 113
android-ndk : 11 = 11 = 0 + 11
waf : 25 = 25 = 0 + 25
trivial : 223 = 223 = 0 + 223
julia : 273 = 273 = 129 + 144
r : 2093 = 2093 = 1991 + 102
guile : 41 = 41 = 14 + 27
elm : 29 = 29 = 24 + 5
cargo : 3342 = 3342 = 195 + 3147
ruby : 475 = 475 = 80 + 395
rebar : 19 = 19 = 11 + 8
scons : 14 = 14 = 0 + 14
font : 85 = 85 = 61 + 24
rakudo : 21 = 21 = 10 + 11
gnu : 4241 = 4241 = 812 + 3429
asdf/ecl : 637 = 637 = 434 + 203
asdf/sbcl : 678 = 678 = 453 + 225
ant : 462 = 462 = 1 + 461
meson : 448 = 448 = 88 + 360
texlive : 143 = 143 = 0 + 143
python : 2630 = 2630 = 803 + 1827
--8<---------------cut here---------------end--------------->8---
[-- Attachment #2: script.scm --]
[-- Type: text/plain, Size: 1688 bytes --]
(use-modules (guix)
(gnu)
(ice-9 match))
(define table (make-hash-table))
(fold-packages (lambda (package result)
(let ((bs (build-system-name
(package-build-system package)))
(arg (package-arguments package)))
(match (hash-ref result bs)
((tot wo wi)
(if (null? arg)
(hash-set! result bs (list
(1+ tot)
(1+ wo)
wi))
(hash-set! result bs (list
(1+ tot)
wo
(1+ wi)))))
(#f (if (null? arg)
(hash-set! result bs (list 1 1 0))
(hash-set! result bs (list 1 0 1))))
(_ (format #t "Error: ~s~%" (package-name package))))
result))
table)
(define fmt "~13s: ~4s = ~4s = ~4s + ~4s~%")
(format #t fmt
'key 'tot 'tot 'no-arguments 'arguments)
(hash-for-each-handle (lambda (kv)
(match kv
((key . value)
(match value
((tot wo wi)
(format #t fmt
key
(+ wo wi)
tot wo wi))))))
table)
next prev parent reply other threads:[~2022-11-18 14:03 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-16 13:09 guix melpa mirror! jgart
2022-11-16 15:52 ` Joshua Branson
2022-11-16 16:48 ` jgart
2022-11-17 15:14 ` Ludovic Courtès
2022-11-18 1:06 ` jgart
2022-11-18 8:20 ` zimoun [this message]
2022-11-21 10:00 ` (M)ELPA package metadata accuracy Ludovic Courtès
2022-11-21 19:07 ` zimoun
2022-11-18 9:46 ` guix melpa mirror! Mekeor Melire
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=86cz9kk71y.fsf@gmail.com \
--to=zimon.toutoune@gmail.com \
--cc=guix-devel@gnu.org \
--cc=jgart@dismail.de \
--cc=ludo@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).