Discussion
Loading...

Post

Log in
  • About
  • Code of conduct
  • Privacy
  • Users
  • Instances
  • About Bonfire
Tom
Tom
@ryuslash@goto.ryuslash.org  路  activity timestamp 4 days ago

Some time ago someone posted a cool hack to use Emacs as the shell for Make, and today I had a related thought: Could I run my Makefile with guix shell --manifest=manifest.scm so that I always run with the correct dependencies installed?

Yes I can.

SHELL = guix
.SHELLFLAGS = shell --manifest=manifest.scm -- sh -c

first:
node --eval='console.log("hello!");'

With a manifest file:

(packages->manifest
(list (specification->package "node")))

Now I don't have to remember to load a guix shell before running my make commands 馃槉 I also added it to my Literate Build Files page on my site.

I'm guessing this is GNU Make specific, though, not portable.

#guix

ryuslash's website's build's files

  • Copy link
  • Flag this post
  • Block
Cayetano Santos
Cayetano Santos
@csantosb@sigmoid.social replied  路  activity timestamp 5 days ago

@ryuslash

As an alternative, you can follow the approach in the #guix #cookbook [1], which automagically takes care of everything for you. Even better, you may make use of #direnv [2] and its built-in "use guix" [3] to customise all project level related.

[1] https://guix.gnu.org/cookbook/en/html_node/Software-Development.html
[2] https://guix.gnu.org/cookbook/en/html_node/Environment-management.html
[3] https://raw.githubusercontent.com/direnv/direnv/refs/heads/master/stdlib.sh

https://raw.githubusercontent.com/direnv/direnv/refs/heads/master/stdlib.sh

Environment management (GNU Guix Cookbook)

Environment management (GNU Guix Cookbook)

Software Development (GNU Guix Cookbook)

Software Development (GNU Guix Cookbook)
  • Copy link
  • Flag this comment
  • Block

bonfire.cafe

A space for Bonfire maintainers and contributors to communicate

bonfire.cafe: About 路 Code of conduct 路 Privacy 路 Users 路 Instances
Bonfire social 路 1.0.1-beta.35 no JS en
Automatic federation enabled
Log in
  • Explore
  • About
  • Members
  • Code of Conduct