19 lines
408 B
Text
Executable file
19 lines
408 B
Text
Executable file
#!/usr/bin/env execlineb
|
|
|
|
importas -D /bin/bash default_shell SHELL
|
|
|
|
elgetopt s:
|
|
importas -D $default_shell shell ELGETOPT_s
|
|
elgetpositionals
|
|
|
|
getcwd -E cwd
|
|
backtick -D "" -E nixdir { find-parent -d flake.nix }
|
|
ifelse { test $nixdir = "" } {
|
|
foreground { echo "flake.nix not found in parents of ${cwd}" }
|
|
exit 1
|
|
}
|
|
|
|
cd $nixdir
|
|
nix develop $@ -c execlineb -c "cd ${cwd} ${shell}"
|
|
|
|
# vim: set ft=execline :
|