all repos — nixfiles @ ea0306a4a802983af8e45d40642b1b493a2fd8ff

System and user configuration, managed by nix and home-manager

add padd function to use instead of nix-shell

Alin
commit

ea0306a4a802983af8e45d40642b1b493a2fd8ff

parent

62a90207aadcbf73877f2e2b6875e002b0a58771

1 file changed, 12 insertions(+), 0 deletions(-)

changed files
A user/settings/fish/functions/padd.fish
@@ -0,0 +1,12 @@
+function padd --description 'add nix packages to PATH temporarily' + for pkg in $argv + set --local out $(nix-build '<nixpkgs>' --attr "$pkg.out" --no-out-link --quiet) + set --local bin $out/bin + if ! path is --type dir $bin + echo "$bin doesn't exist" + else + fish_add_path --global $bin + echo "$bin" + end + end +end