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