help-guix
[Top][All Lists]
Advanced

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

Re: Make a simple guile script to a package - source local file


From: Théo Tyburn
Subject: Re: Make a simple guile script to a package - source local file
Date: Sat, 20 Jan 2024 12:32:08 +0000

Richard Sent <richard@freakingpenguin.com> writes:

> Depending on what you mean by polluting or re-entering the profile
> information all the time this might not be what you want. When I write
> scripts that rely on specific dependencies I don't want to permanently
> install, I write the shebang like this:
>
> --8<---------------cut here---------------start------------->8---
> #!/usr/bin/env -S guix shell ruby ruby-colorize password-store -- ruby
> --8<---------------cut here---------------end--------------->8---

This is a really nice trick !

Unfortunately you either have to reevaluate the profile at each
run or create a profile and do something like

#!/usr/bin/env -S guix shell -p
  ${GUIX_EXTRA_PROFILES}/python-pydbus/python-pydbus -- python3

> This relies on /usr/bin/env supporting -S, which to my understanding
> isn't POSIX but instead a coreutils extension. Pretty sure --container
> would work here but I've not tried it.

Also as you mentioned, I fear I will not be able to directly
distribute this to people not running guix.

But thanks for the hint :)



reply via email to

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