unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
* Guix Environment Best Practices: Shell Hooks, Creating directories, and More
@ 2021-01-20  0:10 jgart
  2021-01-21 12:42 ` Joshua Branson
  0 siblings, 1 reply; 2+ messages in thread
From: jgart @ 2021-01-20  0:10 UTC (permalink / raw)
  To: help-guix

Hello Guix!

Could someone share an example or advice on how to currently achieve the following nix shell hook with guix environment/manifests/gexps/...: 

# define shell startup command
  hooks = ''
    # this allows mix to work on the local directory
    mkdir -p .nix-mix
    mkdir -p .nix-hex
    export MIX_HOME=$PWD/.nix-mix
    export HEX_HOME=$PWD/.nix-hex
    export PATH=$MIX_HOME/bin:$PATH
    export PATH=$HEX_HOME/bin:$PATH
    export LANG=en_US.UTF-8
    export ERL_AFLAGS="-kernel shell_history enabled"
  '';

in mkShell {
  buildInputs = inputs;
  shellHook = hooks;
}

Taken from this blog post on using nix shell for developing elixir:

https://ghedam.at/15443/a-nix-shell-for-developing-elixir

Any help is greatly appreciated.


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Guix Environment Best Practices: Shell Hooks, Creating directories, and More
  2021-01-20  0:10 Guix Environment Best Practices: Shell Hooks, Creating directories, and More jgart
@ 2021-01-21 12:42 ` Joshua Branson
  0 siblings, 0 replies; 2+ messages in thread
From: Joshua Branson @ 2021-01-21 12:42 UTC (permalink / raw)
  To: jgart; +Cc: help-guix


I believe in guix land this is best achieved with

#+BEGIN_SRC
guix environment -m environment.scm
#+END_SRC

Assuming the project that you are working on has such an
"environment.scm" file.

guile-haunt has "package.scm" file that does something like this:

https://github.com/guildhall/guile-haunt/blob/master/package.scm

Relevant blog posts:

https://dthompson.us/reproducible-development-environments-with-gnu-guix.html

https://dthompson.us/ruby-on-guix.html

--
Joshua Branson (joshuaBPMan in #guix)
Sent from Emacs and Gnus
  https://gnucode.me
  https://video.hardlimit.com/accounts/joshua_branson/video-channels
  https://propernaming.org
  "You can have whatever you want, as long as you help
enough other people get what they want." - Zig Ziglar


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-01-21 12:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-20  0:10 Guix Environment Best Practices: Shell Hooks, Creating directories, and More jgart
2021-01-21 12:42 ` Joshua Branson

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).