guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug#51072] [PATCH] gnu: Add Weka


From: Maxime Devos
Subject: [bug#51072] [PATCH] gnu: Add Weka
Date: Sun, 30 Oct 2022 16:34:32 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.1

>+ (uri "mirror://sourceforge/weka/weka-3-9/3.9.5/weka-3-9-5.zip")

These isn't source code, these are binaries (*). With the exception of the bootstrap seeds, things in Guix must be built from source (and even then, we still can build them from source, with "guix build bootstrap-tarballs").

Looking at the git repository, it appears to use Ant, and we have an ant-build-system, so unless there are complicated dependencies, it should be feasible.

>+    (native-inputs `(("unzip" ,unzip)))
>+    (inputs `(("jre" ,icedtea)))

Nowadays you can avoid input labels with (native-inputs (list unzip))
and (inputs (list icedtea)).

>+                           (display
>+                             (string-append
>+                               "#!/bin/sh\n\n"
>+                               (assoc-ref inputs "jre") "/bin/java -jar "
>+                               out "/share/weka/weka.jar \"$@\"\n"))))
>+                         (chmod wrapper #o555))

Do (search-input-file inputs "bin/java") to avoid depending on input labels. Also, you are using /bin/sh (which IIUC will be patched to /gnu/store/.../bin/sh), but for such patching to work, you need to have bash-minimal (or bash) in the inputs -- while bash-minimal is an implicit (native-)input of many build systems, it isn't a regular implicit input, at least for copy-build-system, so this wouldn't work
when cross-compiling, so I propose to add bash-minimal to the inputs.

> +                       #t)))))

Trailing #t are obsolete nowadays.

(*) At least, I expect them to be; the download is in-progress.

Greetings,
Maxime.

Attachment: OpenPGP_0x49E3EE22191725EE.asc
Description: OpenPGP public key

Attachment: OpenPGP_signature
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]