From: "Théo Tyburn" <theo.tyburn@posteo.net>
To: Tomas Volf <wolf@wolfsden.cz>
Cc: help-guix@gnu.org
Subject: Re: Make a simple guile script to a package - source local file
Date: Fri, 19 Jan 2024 21:28:44 +0000 [thread overview]
Message-ID: <87h6j90zrf.fsf@posteo.net> (raw)
In-Reply-To: <ZTp1TiDyDniEI_bW@ws>
Hi again,
Now I want to package a python script that has some dependencies on
python packages.
How do I go about packaging it to make the script available from the command line
without polluting the environment with the dependencies ? I am looking
for a similar effect to running `guix shell python python-a python-b
python-c -- my_script.py` but without re-entering the profile env all
the time. Probably I could achieve this by making a profile and launch
my script from a bash file that sources the profile beforehand, but this
seems tedious. I would like to automate all this, in guile.
Any hints ?
Tomas Volf <wolf@wolfsden.cz> writes:
> [[PGP Signed Part:Undecided]]
> On 2023-10-23 18:01:12 +0000, Théo Tyburn wrote:
>> Hi,
>>
>> I have some guile CLI scripts and I would like to make them accessible
>> in $PATH by putting each of them in a package.
>>
>> Is there a simple way to do this without having to make a git
>> repository ? What I would like is something like this:
>>
>> > (package
>> > (name "script1")
>> > (version "0.0.0")
>> > (source (LOCAL-DIR "/path/to/scripts/"))
>> > (build-system trivial-build-system))
>>
>> and then copy the guile script to /bin using the trivial build-system.
>>
>> I guess what I'm looking for is a function like LOCAL-DIR. It would be
>> similar to git-checkout but wouldn't require git. Is there such
>> a thing ?
>
> I believe you are looking for (source (local-file ..)), example can be found in
> this excellent blog post:
>
> https://guix.gnu.org/en/blog/2023/from-development-environments-to-continuous-integrationthe-ultimate-guide-to-software-development-with-guix/
>
>>
>> Cheers,
>>
>> Théo
>>
>
> )t.
next prev parent reply other threads:[~2024-01-19 21:39 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-23 18:01 Make a simple guile script to a package - source local file Théo Tyburn
2023-10-26 14:18 ` Tomas Volf
2023-10-29 8:44 ` Théo Tyburn
2024-01-19 21:28 ` Théo Tyburn [this message]
2024-01-19 21:46 ` Felix Lechner via
2024-01-20 17:19 ` Théo Tyburn
2024-01-19 22:44 ` Richard Sent
2024-01-20 12:32 ` Théo Tyburn
2024-01-20 13:29 ` Tomas Volf
2024-01-20 18:05 ` Théo Tyburn
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87h6j90zrf.fsf@posteo.net \
--to=theo.tyburn@posteo.net \
--cc=help-guix@gnu.org \
--cc=wolf@wolfsden.cz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.