Open MrFoxPro opened 7 months ago
let
withRoot = script: ''
pushd ${devenv.root}
${script}
popd
'';
in {
scripts.hello.exec = withRoot "hello";
}
let withRoot = script: '' pushd ${devenv.root} ${script} popd ''; in { scripts.hello.exec = withRoot "hello"; }
I mean I have 17 scripts in my monorepository splitted across multiple devenv modules, so I need to apply it to a lot of commands. When using Nix, I would prefer to implement it via expression, but I can't understand how can I extend devenv module to achieve it
I want to make all my scripts run from flake root, like this:
How can I iterate over all my scripts and wrap them into
pushd ... popd
?