aboutsummaryrefslogtreecommitdiffstats
path: root/hm/soispha/pkgs/scripts.nix
diff options
context:
space:
mode:
Diffstat (limited to 'hm/soispha/pkgs/scripts.nix')
-rw-r--r--hm/soispha/pkgs/scripts.nix17
1 files changed, 15 insertions, 2 deletions
diff --git a/hm/soispha/pkgs/scripts.nix b/hm/soispha/pkgs/scripts.nix
index 4a20eb55..fa7ba7ab 100644
--- a/hm/soispha/pkgs/scripts.nix
+++ b/hm/soispha/pkgs/scripts.nix
@@ -21,10 +21,23 @@
path = "apps";
dependencies = builtins.attrValues {inherit (pkgs) udisks gawk gnused gnugrep sudo;};
};
- con2pdf-scr = write_script {
+ con2pdf-scr = sysLib.writeShellScriptWithLibrary {
name = "con2pdf";
- path = "apps";
+ path = ./scripts/apps/con2pdf;
dependencies = builtins.attrValues {inherit (pkgs) sane-backends imagemagick coreutils fd;};
+ generateCompletions = true;
+ replacementStrings = {
+ DEVICE_FUNCTION =
+ # This is here, because escaping the whole function, to use it in the shell script
+ # directly just isn't possible
+ pkgs.writeText "DEVICE_FUNCTION"
+ /*
+ bash
+ */
+ ''
+ scanimage -L | awk 'BEGIN { FS = "`" } { gsub(/'.*/, "", $2); print $2 }'
+ '';
+ };
};
dldragon-scr = write_script {
name = "dldragon";