Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 stdenvNoCC, 4 fetchFromGitHub, 5 makeBinaryWrapper, 6 coreutils, 7 curl, 8 findutils, 9 gawk, 10 gnugrep, 11 gnused, 12 mktemp, 13 netcat, 14 unixtools, 15}: 16 17stdenvNoCC.mkDerivation (finalAttrs: { 18 pname = "tinystatus"; 19 version = "0-unstable-2025-03-27"; 20 21 src = fetchFromGitHub { 22 owner = "bderenzo"; 23 repo = "tinystatus"; 24 rev = "169ee0bb2efe4531080936d1e2a46e451feebe3e"; 25 hash = "sha256-nPrABKKIDP1n1rhcojFJJ15kqa5b4s7F/wMAgD/eVBw="; 26 }; 27 28 nativeBuildInputs = [ makeBinaryWrapper ]; 29 30 installPhase = '' 31 runHook preInstall 32 33 install -Dm755 tinystatus $out/bin/tinystatus 34 wrapProgram $out/bin/tinystatus \ 35 --set PATH "${ 36 lib.makeBinPath [ 37 coreutils 38 curl 39 findutils 40 gawk 41 gnugrep 42 gnused 43 mktemp 44 netcat 45 unixtools.ping 46 ] 47 }" 48 49 runHook postInstall 50 ''; 51 52 doInstallCheck = true; 53 54 installCheckPhase = '' 55 runHook preInstallCheck 56 57 cat <<EOF >test.csv 58 ping, 0, testing, this.should.fail.example.com 59 EOF 60 61 $out/bin/tinystatus test.csv | grep Disrupted 62 63 runHook postInstallCheck 64 ''; 65 66 meta = { 67 description = "Static HTML status page generator written in pure shell"; 68 mainProgram = "tinystatus"; 69 homepage = "https://github.com/bderenzo/tinystatus"; 70 license = lib.licenses.mit; 71 platforms = lib.platforms.unix; 72 maintainers = with lib.maintainers; [ matthewcroughan ]; 73 }; 74})