3 ms·
Sometimes I bake Nix into my personal Makefiles. This means that we lose the non-Nix build processes, but I get to keep the best of both worlds, and don't have
by LanternLight83 3y ago
Sometimes I bake Nix into my personal Makefiles.
This means that we lose the non-Nix build processes, but I get to keep the best of both worlds, and don't have to run `nix shell` or setup direnv.
"Uhm, actually" I use Guix, but the idea is the same:
SHELL = guix shell -m manifest.scm -- bash
public: hugo content
emacs $(pwd) --batch -l export.el
[...]
Or without an external manifest:
SHELL = guix shell --pure bash coreutils emacs emacs-ox-hugo hugo -- bash
This is equivalent to the common shebang trick:
#!/use/bin/env -S guix shell -m manifest.scm -- bash
Or just invoking Guix inside the recipe:
public: hugo content
guix shell -m manifest.scm -- emacs $(pwd) --batch -l export.el
Depending on the complexity of `export.el` (< 5 lines?), I'll often keep that inside the Makefile too; the less files, the better!
But I get it if one wants that file available to call from elsewhere.
- thomastjeffery 3y ago> "Uhm, actually" I use Guix... And there you have it: the fundamental problem. What if I want to port your package to Nix? In practice, I'm sure it's doable, but you are introducing a lot of overhead and complexity by putting that work into that place.