Hello,

Rodrigo Morales <moralesrodrigo1...@gmail.com> writes:

> Table of Contents
> _________________
>
> 1. TL; DR
> 2. My findings
> 3. The question
>
>
> 1 TL; DR
> ========
>
>   Today, I was wondering what the most used build system and the least
>   one are. The most used build system is `gnu-build-system'. The least
>   used build system is `dub-build-system'. Here's how I found that out.
>
>
> 2 My findings
> =============
>
>   ,----
>   | (car %load-path)
>   `----
>
>   ,----
>   |
> /gnu/store/zc7dzsd10dd3pw60hircphz4vh1wlki0-guix-module-union/share/guile/site/3.0
>   `----
>
>   ,----
>   |
> dir="/gnu/store/zc7dzsd10dd3pw60hircphz4vh1wlki0-guix-module-union/share/guile/site/3.0"
>   | path="$dir/gnu/packages"
>   | grep -hREo '[a-zo-]+-build-system' $path | sort | uniq -c | sort -nr
>   `----
>
>   ,----
>   | 3893 gnu-build-system
>   | 2717 python-build-system

[...]


> 3 The question
> ==============
>
>   Does anyone know if there's a more accurate way of finding out this
>   information? I'm asking because my method also counts build systems
>   that are mentioned in comments. For example, if a file contains
>   comments that mention build systems, they are also counted.

Guix provides an API, so you could use it from the comfort of the 'guix
repl' REPL to query it, using fold-packages.

The following repo will surely provide some clues as to how to do that;
the following is an example querying all the packages that make use of
the emacs-build-system [0]

[0]  
https://notabug.org/apteryx/guix-api-examples/src/master/emacs-packages-manifest.scm

Have fun!

-- 
Thanks,
Maxim

Reply via email to