diff --git a/pkgs/by-name/ti/tinystatus/package.nix b/pkgs/by-name/ti/tinystatus/package.nix index 3b1b1e8be8b2..59569bbd3faa 100644 --- a/pkgs/by-name/ti/tinystatus/package.nix +++ b/pkgs/by-name/ti/tinystatus/package.nix @@ -1,56 +1,58 @@ { lib, stdenvNoCC, - makeWrapper, - netcat, - curl, - unixtools, - coreutils, - mktemp, - findutils, - gnugrep, fetchFromGitHub, + makeBinaryWrapper, + coreutils, + curl, + findutils, gawk, + gnugrep, gnused, + mktemp, + netcat, + unixtools, }: -stdenvNoCC.mkDerivation rec { +stdenvNoCC.mkDerivation (finalAttrs: { pname = "tinystatus"; - version = "0-unstable-2021-07-09"; + version = "0-unstable-2025-03-27"; src = fetchFromGitHub { owner = "bderenzo"; repo = "tinystatus"; - rev = "fc128adf240261ac99ea3e3be8d65a92eda52a73"; - sha256 = "sha256-FvQwibm6F10l9/U3RnNTGu+C2JjHOwbv62VxXAfI7/s="; + rev = "169ee0bb2efe4531080936d1e2a46e451feebe3e"; + hash = "sha256-nPrABKKIDP1n1rhcojFJJ15kqa5b4s7F/wMAgD/eVBw="; }; - nativeBuildInputs = [ makeWrapper ]; - - runtimeInputs = [ - curl - netcat - unixtools.ping - coreutils - mktemp - findutils - gnugrep - gawk - gnused - ]; + nativeBuildInputs = [ makeBinaryWrapper ]; installPhase = '' runHook preInstall - install -Dm555 tinystatus $out/bin/tinystatus + + install -Dm755 tinystatus $out/bin/tinystatus wrapProgram $out/bin/tinystatus \ - --set PATH "${lib.makeBinPath runtimeInputs}" + --set PATH "${ + lib.makeBinPath [ + coreutils + curl + findutils + gawk + gnugrep + gnused + mktemp + netcat + unixtools.ping + ] + }" + runHook postInstall ''; doInstallCheck = true; installCheckPhase = '' - runHook preCheck + runHook preInstallCheck cat <test.csv ping, 0, testing, this.should.fail.example.com @@ -58,15 +60,15 @@ stdenvNoCC.mkDerivation rec { $out/bin/tinystatus test.csv | grep Disrupted - runHook postCheck + runHook postInstallCheck ''; - meta = with lib; { + meta = { description = "Static HTML status page generator written in pure shell"; mainProgram = "tinystatus"; homepage = "https://github.com/bderenzo/tinystatus"; - license = licenses.mit; - platforms = platforms.unix; - maintainers = with maintainers; [ matthewcroughan ]; + license = lib.licenses.mit; + platforms = lib.platforms.unix; + maintainers = with lib.maintainers; [ matthewcroughan ]; }; -} +})