Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib, stdenv, fetchFromGitHub 2, makeWrapper, installShellFiles 3, python3, sqlite 4, nixosTests 5}: 6 7stdenv.mkDerivation rec { 8 pname = "tuptime"; 9 version = "5.2.2"; 10 11 src = fetchFromGitHub { 12 owner = "rfmoz"; 13 repo = "tuptime"; 14 rev = version; 15 sha256 = "sha256-YrZP2sovAwwfDBoKoobgkf0+7RmYFUtrV9jfBmDsNL8="; 16 }; 17 18 nativeBuildInputs = [ makeWrapper installShellFiles ]; 19 20 buildInputs = [ python3 ]; 21 22 outputs = [ "out" "man" ]; 23 24 installPhase = '' 25 mkdir -p $out/bin 26 install -m 755 $src/src/tuptime $out/bin/ 27 28 installManPage $src/src/man/tuptime.1 29 30 install -Dm 0755 $src/misc/scripts/db-tuptime-migrate-4.0-to-5.0.sh \ 31 $out/share/tuptime/db-tuptime-migrate-4.0-to-5.0.sh 32 ''; 33 34 preFixup = '' 35 wrapProgram $out/share/tuptime/db-tuptime-migrate-4.0-to-5.0.sh \ 36 --prefix PATH : "${lib.makeBinPath [ sqlite ]}" 37 ''; 38 39 passthru.tests = nixosTests.tuptime; 40 41 meta = with lib; { 42 description = "Total uptime & downtime statistics utility"; 43 homepage = "https://github.com/rfrail3/tuptime"; 44 changelog = "https://github.com/rfrail3/tuptime/blob/master/CHANGELOG"; 45 license = licenses.gpl2Plus; 46 platforms = platforms.all; 47 maintainers = [ maintainers.evils ]; 48 }; 49}