Add wireshark, cleanup on fish functions

This commit is contained in:
Erwin Boskma 2022-03-01 20:06:19 +01:00
parent e6643c0d1d
commit b071f6c695
Signed by: erwin
GPG key ID: 270B20D17394F7E5
3 changed files with 19 additions and 17 deletions

View file

@ -11,7 +11,7 @@ in
config = mkIf (cfg.enable) {
programs.fish = {
enable = true;
functions = (import ./functions.nix);
functions = (import ./functions.nix { inherit (pkgs) git; });
plugins = [
{

View file

@ -1,3 +1,4 @@
{ git }:
{
reload = {
body = ''
@ -19,9 +20,9 @@
clangfmt = {
body = ''
set source_exts "h" "hpp" "c" "cpp" "cc" "cp" "c++" "cxx" "cu" "proto"
set files (git diff --diff-filter=ACMR --name-only $argv[1])
set repo_path (realpath --relative-to=$PWD (git rev-parse --show-toplevel))
set clangformat (git config --get clangFormat.binary)
set files (${git}/bin/git diff --diff-filter=ACMR --name-only $argv[1])
set repo_path (realpath --relative-to=$PWD (${git}/bin/git rev-parse --show-toplevel))
set clangformat (${git}/bin/git config --get clangFormat.binary)
echo "Formatting files in $repo_path with $clangformat"
for f in $files

View file

@ -107,6 +107,7 @@ in
tdesktop
unzip
xdg-utils
wireshark
wl-clipboard
] ++
(with gst_all_1; [ gstreamer gstreamer.dev gst-plugins-base gst-plugins-good gst-plugins-bad gst-plugins-ugly gst-libav gst-vaapi ]);