bob icon indicating copy to clipboard operation
bob copied to clipboard

Feature Request: support configuration directly in nix flakes

Open TECHNOFAB11 opened this issue 1 year ago • 2 comments

Bob aims to make nix easier to use, but especially flakes have changed my workflow a lot and I really like them. I also use devenv.sh but still use bob to actually build things. It would be really cool if I could configure bob directly in the project flake.nix. Bob is a nice "inbetween" of things like Makefile or Taskfile and fully using Nix to build for example a Go package.

Just an idea for the future ;)

TECHNOFAB11 avatar May 23 '23 17:05 TECHNOFAB11

Hi @TECHNOFAB11 thank you for your suggestion! That mix of tools sounds very interesting. Can you give us a little bit more details about your use case or an example of your devenv and flake.nix files? Do you install bob via devenv or flake.nix?

dketterer avatar Jun 13 '23 13:06 dketterer

Hi @dketterer Sure, my main pain point that resulted in this was that I wanted to use a program from another flake for which I imported the flake into my local one and then I could add this to the devenv packages/a devenv exec script. Something like that would be cool for bob, basically being able to use variables/especially packages from the flake in a bob build step. (example: I have a CLI tool "inka" where I added a flake.nix and now I import this flake into my projects and am able to access the derivation/package)

For now I'm using devShells to get all the packages and then just Taskfile to run the commands & get caching. The issue is that there are more packages than needed in every build task & that these are not pure/sandboxed. devenv.sh only works with --impure which actually resulted in some issues for me before when trying to run the same thing in CI.

Ultimately it would be cool to have everything in the flake.nix, thus this idea. That way I could reference an package I need for a build step from another flake (eg. ${inputs.something.packages.something}/bin/something).

I hope its maybe gotten a little bit clearer what I mean :D

TECHNOFAB11 avatar Jun 13 '23 19:06 TECHNOFAB11

I recently created a wrapper for Taskfile in Nix which allows me to do exactly what I wanted from this issue, so I'm closing this

TECHNOFAB11 avatar Mar 16 '24 20:03 TECHNOFAB11