2022-05-20 06:34:51 -04:00
|
|
|
#!/usr/bin/env execlineb
|
|
|
|
|
|
|
|
importas -D /bin/bash default_shell SHELL
|
|
|
|
|
2022-05-20 10:50:24 -04:00
|
|
|
elgetopt s:
|
2022-05-20 06:34:51 -04:00
|
|
|
importas -D $default_shell shell ELGETOPT_s
|
|
|
|
elgetpositionals
|
|
|
|
|
|
|
|
getcwd -E cwd
|
2022-05-20 10:50:24 -04:00
|
|
|
backtick -D "" -E nixdir { find-parent -d flake.nix }
|
|
|
|
ifelse { test $nixdir = "" } {
|
|
|
|
foreground { echo "flake.nix not found in parents of ${cwd}" }
|
|
|
|
exit 1
|
|
|
|
}
|
2022-05-20 06:34:51 -04:00
|
|
|
|
|
|
|
cd $nixdir
|
2023-11-09 20:25:44 -05:00
|
|
|
nix develop --no-warn-dirty $@ -c execlineb -c "cd ${cwd} ${shell}"
|
2022-05-20 06:34:51 -04:00
|
|
|
|
|
|
|
# vim: set ft=execline :
|