[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: |
Fri, 19 Jan 2024 21:28:44 +0000 |
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.
- Re: Make a simple guile script to a package - source local file,
Théo Tyburn <=