aboutsummaryrefslogtreecommitdiffstats
path: root/pkgs
diff options
context:
space:
mode:
authorBenedikt Peetz <benedikt.peetz@b-peetz.de>2025-04-14 11:49:11 +0200
committerBenedikt Peetz <benedikt.peetz@b-peetz.de>2025-04-14 11:49:11 +0200
commit7b55ba81914277b15de93596081e35ae918810d9 (patch)
treed48005d47188f1302424a329874040c082ddbd21 /pkgs
parentpkgs/git-edit-index: Migrate to `writeShellApplication` (diff)
downloadnixos-config-7b55ba81914277b15de93596081e35ae918810d9.zip
pkgs/hibernate: Migrate to `writeShellApplication`
Diffstat (limited to 'pkgs')
-rwxr-xr-xpkgs/by-name/hi/hibernate/hibernate.sh3
-rw-r--r--pkgs/by-name/hi/hibernate/package.nix11
2 files changed, 6 insertions, 8 deletions
diff --git a/pkgs/by-name/hi/hibernate/hibernate.sh b/pkgs/by-name/hi/hibernate/hibernate.sh
index 30868fd1..59b08ec0 100755
--- a/pkgs/by-name/hi/hibernate/hibernate.sh
+++ b/pkgs/by-name/hi/hibernate/hibernate.sh
@@ -1,7 +1,6 @@
#!/usr/bin/env dash
-# shellcheck source=/dev/null
-SHELL_LIBRARY_VERSION="2.1.2" . %SHELL_LIBRARY_PATH
+# TODO(@bpeetz): This functionality could be moved to `tskm`. <2025-04-14>
context="$(task _get rc.context)"
[ "$context" ] && task context none
diff --git a/pkgs/by-name/hi/hibernate/package.nix b/pkgs/by-name/hi/hibernate/package.nix
index 54716606..f0fb4e96 100644
--- a/pkgs/by-name/hi/hibernate/package.nix
+++ b/pkgs/by-name/hi/hibernate/package.nix
@@ -1,14 +1,13 @@
{
- sysLib,
+ writeShellApplication,
systemd,
taskwarrior3,
}:
-sysLib.writeShellScript {
+writeShellApplication {
name = "hibernate";
- src = ./hibernate.sh;
- generateCompletions = false;
- keepPath = false;
- dependencies = [
+ text = builtins.readFile ./hibernate.sh;
+ inheritPath = false;
+ runtimeInputs = [
systemd
taskwarrior3
];