summaryrefslogtreecommitdiffstats
path: root/pkgs/simple/flameshot-once/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/simple/flameshot-once/default.nix')
-rw-r--r--pkgs/simple/flameshot-once/default.nix28
1 files changed, 28 insertions, 0 deletions
diff --git a/pkgs/simple/flameshot-once/default.nix b/pkgs/simple/flameshot-once/default.nix
index 20a69c74..68a1ed6f 100644
--- a/pkgs/simple/flameshot-once/default.nix
+++ b/pkgs/simple/flameshot-once/default.nix
@@ -76,6 +76,34 @@ pkgs.symlinkJoin {
}
// {
dev = pkgs.write "flameshot-once-tools" {
+ "/bin/get-buttonTypes" = {
+ executable = true;
+ text = /* sh */ ''
+ #! ${pkgs.dash}/bin/dash
+ indent=$(${placeholder "out"}/bin/indent-of buttonTypes)
+ src=${cfg.package.src}/src/tools/capturetool.h
+ ${pkgs.coreutils}/bin/cat "$src" |
+ ${pkgs.gnused}/bin/sed -nr '
+ s/^\s*(TYPE_\S+)\s*=\s*([0-9]+),/\1 = \2;/p
+ ' |
+ ${placeholder "out"}/bin/prefix " $indent"
+ '';
+ };
+ "/bin/get-iterableButtonTypes" = {
+ executable = true;
+ text = /* sh */ ''
+ #! ${pkgs.dash}/bin/dash
+ indent=$(${placeholder "out"}/bin/indent-of iterableButtonTypes)
+ src=${cfg.package.src}/src/widgets/capture/capturetoolbutton.cpp
+ ${pkgs.coreutils}/bin/cat "$src" |
+ ${pkgs.gnused}/bin/sed -n '/\<iterableButtonTypes = {/,/^}/p' |
+ ${pkgs.gcc}/bin/cpp -DENABLE_IMGUR |
+ ${pkgs.coreutils}/bin/tr , \\n |
+ ${pkgs.gnused}/bin/sed -rn 's/^ *CaptureTool::(TYPE_[A-Z_]+).*/"\1"/p' |
+ ${pkgs.coreutils}/bin/sort |
+ ${placeholder "out"}/bin/prefix " $indent"
+ '';
+ };
"/bin/get-recognizedGeneralOptions" = {
executable = true;
text = /* sh */ ''