diff options
author | Linnnus <[email protected]> | 2024-11-16 12:29:08 +0100 |
---|---|---|
committer | Linnnus <[email protected]> | 2024-11-16 12:29:08 +0100 |
commit | ef73ba2355fb5e48a1921c656f1b8e2106700b61 (patch) | |
tree | c9d14cb6f5c072b3002832fa764c82601919cea2 /pkgs/human-sleep/default.nix | |
parent | e89335c5f59963d902ac35df6ad9e3bac1040195 (diff) |
pkgs: Add human-sleep
Diffstat (limited to 'pkgs/human-sleep/default.nix')
-rw-r--r-- | pkgs/human-sleep/default.nix | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/pkgs/human-sleep/default.nix b/pkgs/human-sleep/default.nix new file mode 100644 index 0000000..0a7db19 --- /dev/null +++ b/pkgs/human-sleep/default.nix @@ -0,0 +1,27 @@ +{ + stdenv, + lib, +}: +stdenv.mkDerivation { + pname = "human-sleep"; + version = "16-11-2024"; # Date of last change + + src = ./.; + buildPhase = '' + cc human-sleep.c -Wall -Wextra -o human-sleep + ''; + + # TODO: Run check phase: `cscript -DTEST human-sleep.c` + + installPhase = '' + mkdir -p $out/bin + mv human-sleep $out/bin/human-sleep + ln -s human-sleep $out/bin/hsleep + ''; + + meta = with lib; { + description = "Variant of the classic 'sleep' command that accepts suffixed numbers like '5 minutes'"; + license = licenses.unlicense; + mainProgram = "human-sleep"; + }; +} |