Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Script Directory Support #1255

Open
rawkode opened this issue Jun 7, 2024 · 2 comments
Open

Script Directory Support #1255

rawkode opened this issue Jun 7, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@rawkode
Copy link
Contributor

rawkode commented Jun 7, 2024

I understand that we can configure scripts with scripts.dev.exec = ''...''.

I quite like to get syntax highlighting and linting for my shell scripts, as such I've started using scripts.dev.exec = builtins.readFile ./scripts/dev.sh; instead.

This works, but manually hooking up each script to each script file is a little cumbersome.

Could we get a helper that allows scripts.directory = './scripts'; ?

The name of the file would be how we invocate and the contents get executed using the interpretor from the shebang?

@rawkode rawkode added the enhancement New feature or request label Jun 7, 2024
@rawkode
Copy link
Contributor Author

rawkode commented Jun 8, 2024

I seen in the common patterns doc that you suggest doing the following for this use-case:

  enterShell = ''
    export PATH="$HOME/.mix/escripts:$PATH"
  '';

@domenkozar
Copy link
Member

We need something like this: https://code.tvl.fyi/about/nix/readTree

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants