about summary refs log tree commit diff stats
path: root/pkgs/by-name/co
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/by-name/co')
-rwxr-xr-xpkgs/by-name/co/con2pdf/con2pdf.sh17
-rw-r--r--pkgs/by-name/co/con2pdf/package.nix17
2 files changed, 12 insertions, 22 deletions
diff --git a/pkgs/by-name/co/con2pdf/con2pdf.sh b/pkgs/by-name/co/con2pdf/con2pdf.sh
index 27c9d092..e5d8ce37 100755
--- a/pkgs/by-name/co/con2pdf/con2pdf.sh
+++ b/pkgs/by-name/co/con2pdf/con2pdf.sh
@@ -1,19 +1,8 @@
 #! /usr/bin/env dash
 
-# shellcheck source=/dev/null
-SHELL_LIBRARY_VERSION="2.1.2" . %SHELL_LIBRARY_PATH
-
-# needed for help() and version
-# shellcheck disable=2034
-AUTHORS="Soispha"
-# shellcheck disable=2034
-YEARS="2023"
-# shellcheck disable=2034
-VERSION="1.0.0"
-
-# NAME is from the wrapper
-# shellcheck disable=SC2269
-NAME="$NAME"
+# TODO(@bpeetz): This should probably be rewritten in rust. <2025-04-14>
+
+NAME="con2pdf"
 help() {
     cat <<EOF
 Scan images and turn them into a pdf.
diff --git a/pkgs/by-name/co/con2pdf/package.nix b/pkgs/by-name/co/con2pdf/package.nix
index 8eb994fd..df24872c 100644
--- a/pkgs/by-name/co/con2pdf/package.nix
+++ b/pkgs/by-name/co/con2pdf/package.nix
@@ -1,24 +1,25 @@
 {
-  sysLib,
+  writeShellApplication,
   writeText,
-  # dependencies
+  # Dependencies
   sane-backends,
   imagemagick,
   coreutils,
   fd,
 }:
-sysLib.writeShellScript {
+writeShellApplication {
   name = "con2pdf";
-  src = ./con2pdf.sh;
-  generateCompletions = true;
-  keepPath = false;
-  dependencies = [
+  text = builtins.readFile ./con2pdf.sh;
+  inheritPath = false;
+
+  runtimeInputs = [
     sane-backends
     imagemagick
     coreutils
     fd
   ];
-  replacementStrings = {
+
+  runtimeEnv = {
     DEVICE_FUNCTION =
       # This is here, because escaping the whole function, to use it in the shell script
       # directly just isn't possible