[bug#56136] gnu: freedesktop: Add basu 0.2.0.

Message ID 20220622084035.10863-1-mail@muradm.net
State New
Headers
Series [bug#56136] gnu: freedesktop: Add basu 0.2.0. |

Commit Message

muradm June 22, 2022, 8:40 a.m. UTC
  * gnu/packages/freedesktop.scm (basu): New variable.
---
 gnu/packages/freedesktop.scm | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)
  

Comments

Maxime Devos June 22, 2022, 10:02 a.m. UTC | #1
muradm schreef op wo 22-06-2022 om 11:40 [+0300]:
> +    (license license:gpl2)))

Looking at
<https://git.sr.ht/~emersion/basu/tree/master/item/meson.build#L5>, it
seems to be LGPL2.1+, not GPL-2-only?

Greetings,
Maxime.
  
Maxime Devos June 22, 2022, 11:54 a.m. UTC | #2
muradm schreef op wo 22-06-2022 om 11:40 [+0300]:
> +    (inputs
> +     (list pkg-config python gperf libcap))

(Didn't notice this previously):

  * gperf is a binary (usually) run during the build to generate stuff,
    so it needs to be in native-inputs for cross-compilation to work.

  * pkg-config is almost surely needs to be native-inputs (it's like a
    (cross-) compiler).  "./pre-inst-env guix lint basu" probably would
    report this.

    As a test, you can try
    "./pre-inst-env guix build basu --target=aarch64-linux-gnu" or
    such.

  * whether python is native- or non-native depends on how it is used.

  * libcap looks fine from here.

Greetings,
Maxime.
  
muradm June 22, 2022, 12:07 p.m. UTC | #3
Fixed in v3

Maxime Devos <maximedevos@telenet.be> writes:

> [[PGP Signed Part:Undecided]]
> muradm schreef op wo 22-06-2022 om 11:40 [+0300]:
>> +    (inputs
>> +     (list pkg-config python gperf libcap))
>
> (Didn't notice this previously):
>
>   * gperf is a binary (usually) run during the build to generate 
>   stuff,
>     so it needs to be in native-inputs for cross-compilation to 
>     work.
>
>   * pkg-config is almost surely needs to be native-inputs (it's 
>   like a
>     (cross-) compiler).  "./pre-inst-env guix lint basu" 
>     probably would
>     report this.
Didn't see any warning or else.

>
>     As a test, you can try
>     "./pre-inst-env guix build basu --target=aarch64-linux-gnu" 
>     or
>     such.
>
>   * whether python is native- or non-native depends on how it is 
>   used.
Python nedeed by gperf scripts, so native- also.

>
>   * libcap looks fine from here.
>
> Greetings,
> Maxime.
>
> [[End of PGP Signed Part]]
  
Maxime Devos June 22, 2022, 1:08 p.m. UTC | #4
muradm schreef op wo 22-06-2022 om 15:07 [+0300]:
> >    * pkg-config is almost surely needs to be native-inputs (it's 
> >    like a
> >      (cross-) compiler).  "./pre-inst-env guix lint basu" 
> >      probably would
> >      report this.
> Didn't see any warning or else.

Can't reproduce:

$ guix lint -L . basu  # (*)
./a.scm:24:5: basu@0.2.0: ‘pkg-config’ zou waarschijnlijk inheemse voer moeten zijn
./a.scm:25:14: basu@0.2.0: geen punt toegestaan aan het einde van de synopsis
fetching CVE database for 2022...
fetching CVE database for 2021...
fetching CVE database for 2020...
[...]

(i.e.: the translation for 'native' is in retrospect confusing, pkg-config should
probably be a native-input instead and a synopsis may not end with a period)

(*): I put the package definition into a separate file, hence the -L ..  In your case,
that would be  './pre-inst-env guix lint basu' instead

Greetings,
Maxime.
  
muradm June 22, 2022, 1:14 p.m. UTC | #5
For v3 with lint I got only this:

gnu/packages/freedesktop.scm:726:14: basu@0.2.0: no period allowed 
at the end of the synopsis

v4 has no lint warnings.

--
muradm

Maxime Devos <maximedevos@telenet.be> writes:

> [[PGP Signed Part:Undecided]]
> muradm schreef op wo 22-06-2022 om 15:07 [+0300]:
>> >    * pkg-config is almost surely needs to be native-inputs 
>> > (it's
>> >    like a
>> >      (cross-) compiler).  "./pre-inst-env guix lint basu"
>> >      probably would
>> >      report this.
>> Didn't see any warning or else.
>
> Can't reproduce:
>
> $ guix lint -L . basu  # (*)
> ./a.scm:24:5: basu@0.2.0: ‘pkg-config’ zou waarschijnlijk 
> inheemse voer moeten zijn
> ./a.scm:25:14: basu@0.2.0: geen punt toegestaan aan het einde 
> van de synopsis
> fetching CVE database for 2022...
> fetching CVE database for 2021...
> fetching CVE database for 2020...
> [...]
>
> (i.e.: the translation for 'native' is in retrospect confusing, 
> pkg-config should
> probably be a native-input instead and a synopsis may not end 
> with a period)
>
> (*): I put the package definition into a separate file, hence 
> the -L ..  In your case,
> that would be  './pre-inst-env guix lint basu' instead
>
> Greetings,
> Maxime.
>
> [[End of PGP Signed Part]]
  
Maxime Devos June 22, 2022, 4:32 p.m. UTC | #6
muradm schreef op wo 22-06-2022 om 16:14 [+0300]:
> For v3 with lint I got only this:
> 
> gnu/packages/freedesktop.scm:726:14: basu@0.2.0: no period allowed 
> at the end of the synopsis

My comment was on the v2, not the v3.  You wrote that:

> >   * pkg-config is almost surely needs to be native-inputs (it's 
> >   like a
> >     (cross-) compiler).  "./pre-inst-env guix lint basu" 
> >     probably would
> >     report this.
> Didn't see any warning or else.

... which would seem to be somehow a bug in "guix lint" or an incorrect
use of "guix lint".  Basically, I don't understand how you didn't get
any warnings.

Greetings,
Maxime.
  

Patch

diff --git a/gnu/packages/freedesktop.scm b/gnu/packages/freedesktop.scm
index 29bb7c1664..7269520a21 100644
--- a/gnu/packages/freedesktop.scm
+++ b/gnu/packages/freedesktop.scm
@@ -29,6 +29,7 @@ 
 ;;; Copyright © 2021 John Kehayias <john.kehayias@protonmail.com>
 ;;; Copyright © 2021, 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
 ;;; Copyright © 2022 Daniel Meißner <daniel.meissner-i4k@ruhr-uni-bochum.de>
+;;; Copyright © 2022 muradm <mail@muradm.net>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -702,6 +703,30 @@  (define-public elogind
 of a the system to know what users are logged in, and where.")
     (license license:lgpl2.1+)))
 
+(define-public basu
+  (package
+    (name "basu")
+    (version "0.2.0")
+    (home-page "https://git.sr.ht/~emersion/basu")
+    (source
+     (origin
+       (method git-fetch)
+       (uri
+        (git-reference
+         (url home-page)
+         (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "0h23n7wg18xc7xwldca18wi00iajyliixwicqyvv38qx831d8q18"))))
+    (build-system meson-build-system)
+    (inputs
+     (list pkg-config python gperf libcap))
+    (synopsis "The sd-bus library, extracted from systemd.")
+    (description "Some projects rely on the sd-bus library for DBus support.
+However not all systems have systemd or elogind installed.
+This library provides just sd-bus (and the busctl utility).")
+    (license license:gpl2)))
+
 (define-public localed
   ;; XXX: This package is extracted from systemd but we retain so little of it
   ;; that it would make more sense to maintain a fork of the bits we need.