Open eureka-cpu opened 3 months ago
would you mind also move script into separate file out of nix and make builtins.readFile
in nix? It will make script reusable out of nix.
also you may consider using https://github.com/ko1nksm/getoptions by refencing it as non flake input? it parses into ENV vars kind of as it seems.
would you mind also move script into separate file out of nix and make
builtins.readFile
in nix? It will make script reusable out of nix.also you may consider using https://github.com/ko1nksm/getoptions by refencing it as non flake input? it parses into ENV vars kind of as it seems.
Do you have an example of how someone would use this in a non-nix setting? It's a nix developer tool, so I only really see anyone using it with nix.
It would be cool to allow environment variables for variables in the script that rely on the command line flags so that the watcher could be declarative. Basically I'd like to be able to do:
How the default variables are constructed would need to change. The following is the behaviour I'd expect:
NIX_WATCH_COMMAND="nix build --keep-going"
but the user specifiesnix-watch -x "nix flake check"
There may be other quirks that will present themselves as I haven't entirely thought this out, but that's the gist.