diff options
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"; + }; +} |