about summary refs log tree commit diff stats
path: root/pkgs/by-name/co
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xpkgs/by-name/co/con2pdf/con2pdf.sh27
-rw-r--r--pkgs/by-name/co/con2pdf/package.nix26
2 files changed, 31 insertions, 22 deletions
diff --git a/pkgs/by-name/co/con2pdf/con2pdf.sh b/pkgs/by-name/co/con2pdf/con2pdf.sh
index 27c9d092..dbcef77d 100755
--- a/pkgs/by-name/co/con2pdf/con2pdf.sh
+++ b/pkgs/by-name/co/con2pdf/con2pdf.sh
@@ -1,19 +1,18 @@
 #! /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"
+# nixos-config - My current NixOS configuration
+#
+# Copyright (C) 2025 Benedikt Peetz <benedikt.peetz@b-peetz.de>
+# SPDX-License-Identifier: GPL-3.0-or-later
+#
+# This file is part of my nixos-config.
+#
+# You should have received a copy of the License along with this program.
+# If not, see <https://www.gnu.org/licenses/gpl-3.0.txt>.
+
+# 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..11d45ab5 100644
--- a/pkgs/by-name/co/con2pdf/package.nix
+++ b/pkgs/by-name/co/con2pdf/package.nix
@@ -1,24 +1,34 @@
+# nixos-config - My current NixOS configuration
+#
+# Copyright (C) 2025 Benedikt Peetz <benedikt.peetz@b-peetz.de>
+# SPDX-License-Identifier: GPL-3.0-or-later
+#
+# This file is part of my nixos-config.
+#
+# You should have received a copy of the License along with this program.
+# If not, see <https://www.gnu.org/licenses/gpl-3.0.txt>.
 {
-  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