guix-devel
[Top][All Lists]
Advanced

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

Re: Installing a wrapper guile script in <out>/bin


From: Maxime Devos
Subject: Re: Installing a wrapper guile script in <out>/bin
Date: Wed, 03 Feb 2021 11:00:24 +0100
User-agent: Evolution 3.34.2

> Say I have a script that reads /proc/cpuinfo and runs my executable with the
> correct flags to load the library with the best CPU features possible. How can
> I embed such a script in the package definition (as a gexp?) and install it
> under <out>/bin/?

Let's presume the binary is called $X.

What I would do: add a build phase after the "install" phase that renames
<out>/bin/$X to <out>/bin/.$X-real using the rename-file procedure.  Create
your wrapper script at <out>/bin/.$X-real with call-with-output-file, some
I/O procedures and chmod (to make the wrapper script executable).

I hope that helps, Maxime.

Attachment: signature.asc
Description: This is a digitally signed message part


reply via email to

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