about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorBenedikt Peetz <benedikt.peetz@b-peetz.de>2025-04-14 11:55:43 +0200
committerBenedikt Peetz <benedikt.peetz@b-peetz.de>2025-04-14 11:55:43 +0200
commit8eb452f2c26a67987fb2818617b34575ddfd94a3 (patch)
tree154d4d0fcf3eb6e5656b48d06c5dfa48a1277dd3
parentpkgs/snap-sync-forked: Migrate to `writeShellApplication` (diff)
downloadnixos-config-8eb452f2c26a67987fb2818617b34575ddfd94a3.zip
pkgs/stamp: Migrate to `writeShellApplication`
Diffstat (limited to '')
-rw-r--r--pkgs/by-name/st/stamp/package.nix18
-rwxr-xr-xpkgs/by-name/st/stamp/stamp.sh6
2 files changed, 12 insertions, 12 deletions
diff --git a/pkgs/by-name/st/stamp/package.nix b/pkgs/by-name/st/stamp/package.nix
index 703f73e3..998268a6 100644
--- a/pkgs/by-name/st/stamp/package.nix
+++ b/pkgs/by-name/st/stamp/package.nix
@@ -1,20 +1,18 @@
 {
-  sysLib,
-  findutils,
+  writeShellApplication,
+  # Dependencies
   fd,
-  reuse,
   git,
+  reuse,
 }:
-sysLib.writeShellScript {
+writeShellApplication {
   name = "stamp";
-  src = ./stamp.sh;
-  generateCompletions = false;
-  keepPath = false;
+  text = builtins.readFile ./stamp.sh;
+  inheritPath = false;
 
-  dependencies = [
-    findutils
+  runtimeInputs = [
     fd
-    reuse
     git
+    reuse
   ];
 }
diff --git a/pkgs/by-name/st/stamp/stamp.sh b/pkgs/by-name/st/stamp/stamp.sh
index 0aa6c281..63b915a0 100755
--- a/pkgs/by-name/st/stamp/stamp.sh
+++ b/pkgs/by-name/st/stamp/stamp.sh
@@ -1,7 +1,9 @@
 #!/usr/bin/env dash
 
-# shellcheck source=/dev/null
-SHELL_LIBRARY_VERSION="2.1.2" . %SHELL_LIBRARY_PATH
+die() {
+    echo "Error: $1"
+    exit 1
+}
 
 help() {
     cat <<EOF