unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: "Nick Zalutskiy" <nick@const.fun>
To: "Aleksandr Vityazev" <avityazev@posteo.org>
Cc: 52807@debbugs.gnu.org
Subject: bug#52807: Guix home executables are not executable
Date: Sun, 26 Dec 2021 17:25:08 -0500	[thread overview]
Message-ID: <78b0a8f3-d49a-47ec-b46a-bfaaedcb2f0d@www.fastmail.com> (raw)
In-Reply-To: <87fsqfjb2n.fsf@posteo.org>

Indeed I missed this in the manual. Thank you!

I was trying to figure out how to close this... no luck.

-Nick

On Sun, Dec 26, 2021, at 4:44 PM, Aleksandr Vityazev wrote:
> Hi,
>
> On 2021-12-26, 12:03 -0500, "Nick Zalutskiy" <nick@const.fun> wrote:
>
>>      I'd like to use `guix home` to symlink an executable into my home directory. 
>>
>>      Following simple configuration stored at `~/.dotfiles/home-configuration.scm`
>>
>>          (use-modules
>>            (gnu home)
>>            (gnu packages)
>>            (gnu home services)
>>            (gnu services)
>>            (guix gexp)
>>            (gnu home services shells))
>>
>>          (home-environment
>>            (services
>>              (list (service
>>                      home-bash-service-type
>>                      (home-bash-configuration
>>                    (guix-defaults? #t)))
>>                (simple-service 'my-files
>>                        home-files-service-type
>>                        `(("run" ,(local-file "run")))))))
>>
>>      `~/.dotfiles/run` is an executable file, after home reconfigure a `~/.run` symlink is created,
>>      however the file it is pointing to does _not_ have the execute bit set.
>>
>>      As a result, when I try to execute `~/.run` file I get a "Permission denied" error.
>>
>>      Thank you,
>>
>>      -Nick
>>
> In the Guix manual you can find the following information about
> local-file:
>
> --8<---------------cut here---------------start------------->8---
> -- Scheme Procedure: local-file FILE [NAME] [#:recursive? #f]
>           [#:select? (const #t)]
>          
> When RECURSIVE? is true, the contents of FILE are added
>      recursively; if FILE designates a flat file and RECURSIVE? is true,
>      its contents are added, and its permission bits are kept.
> --8<---------------cut here---------------end--------------->8---
>
> So you can just do this:
>
> #+begin_src scheme
> (simple-service 'my-files
>                 home-files-service-type
>                 `(("run" ,(local-file "run" #:recursive? #t))))
> #+end_src
>
> -- 
> Best regards,
> Aleksandr Vityazev




  reply	other threads:[~2021-12-26 22:26 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-26 17:03 bug#52807: Guix home executables are not executable Nick Zalutskiy
2021-12-26 21:44 ` Aleksandr Vityazev
2021-12-26 22:25   ` Nick Zalutskiy [this message]
2021-12-27  8:48     ` Maxime Devos

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

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=78b0a8f3-d49a-47ec-b46a-bfaaedcb2f0d@www.fastmail.com \
    --to=nick@const.fun \
    --cc=52807@debbugs.gnu.org \
    --cc=avityazev@posteo.org \
    /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 public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).