From ef65b728d30335c1fca72e93504c205b547f0001 Mon Sep 17 00:00:00 2001 From: Evils Date: Tue, 24 Mar 2020 23:21:03 +0100 Subject: [PATCH] tuptime: init at 4.1.0 --- pkgs/tools/system/tuptime/default.nix | 35 +++++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 37 insertions(+) create mode 100644 pkgs/tools/system/tuptime/default.nix diff --git a/pkgs/tools/system/tuptime/default.nix b/pkgs/tools/system/tuptime/default.nix new file mode 100644 index 00000000000..acc96998952 --- /dev/null +++ b/pkgs/tools/system/tuptime/default.nix @@ -0,0 +1,35 @@ +{ stdenv, fetchFromGitHub, python3 }: + +stdenv.mkDerivation rec { + pname = "tuptime"; + version = "4.1.0"; + + src = fetchFromGitHub { + owner = "rfrail3"; + repo = "tuptime"; + rev = version; + sha256 = "0p5v1jp6bl0hjv04q3gh11q6dx9z0x61h6svcbvwp5ni0h1bkz1a"; + }; + + buildInputs = [ python3 ]; + + installPhase = '' + mkdir -p $out/bin + install -m 755 src/tuptime $out/bin/ + + mkdir -p $out/share/man/man1 + cp src/man/tuptime.1 $out/share/man/man1/ + + # upstream only ships this, there are more scripts there... + mkdir -p $out/usr/share/doc/tuptime/contrib + cp misc/scripts/uptimed-to-tuptime.py $out/usr/share/doc/tuptime/contrib/ + ''; + + meta = with stdenv.lib; { + description = "Total uptime & downtime statistics utility"; + homepage = "https://github.com/rfrail3/tuptime"; + license = licenses.gpl2; + platforms = platforms.all; + maintainers = [ maintainers.evils ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index eba10401d5c..8527751e9bb 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -7082,6 +7082,8 @@ in tuir = callPackage ../applications/misc/tuir { }; + tuptime = callPackage ../tools/system/tuptime { }; + turses = callPackage ../applications/networking/instant-messengers/turses { }; oysttyer = callPackage ../applications/networking/instant-messengers/oysttyer { };