3
0
Fork 0
forked from mirrors/nixpkgs

timetagger: init at 21.11.2

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
This commit is contained in:
Matthias Beyer 2021-12-19 21:34:40 +01:00
parent e9d1e53c6e
commit a2a43df955
4 changed files with 79 additions and 0 deletions

View file

@ -0,0 +1,36 @@
{ lib
, python3Packages
, fetchFromGitHub
}:
python3Packages.buildPythonPackage rec {
pname = "timetagger";
version = "21.11.2";
src = fetchFromGitHub {
owner = "almarklein";
repo = pname;
rev = "v${version}";
sha256 = "0fyxlm5l3xhbp2p9di51pkkb65mrwzyix74nizr2ady43ylpm07p";
};
meta = with lib; {
homepage = "https://timetagger.app";
license = licenses.gpl3;
description = "Tag your time, get the insight";
maintainers = with maintainers; [ matthiasbeyer ];
};
doCheck = false;
propagatedBuildInputs = with python3Packages; [
asgineer
itemdb
jinja2
markdown
pscript
pyjwt
uvicorn
];
}

View file

@ -0,0 +1,39 @@
{ lib
, pkgs
, python3Packages
, fetchFromGitHub
, addr ? "127.0.0.1"
, port ? 8082
}:
#
# Timetagger itself is a library that a user must write a "run.py" script for
# We provide a basic "run.py" script with this package, which simply starts
# timetagger.
#
let
tt = python3Packages.timetagger;
in
python3Packages.buildPythonPackage rec {
pname = tt.name;
version = tt.version;
src = tt.src;
meta = tt.meta;
propagatedBuildInputs = [ tt ]
++ (with python3Packages; [
setuptools
]);
format = "custom";
installPhase = ''
mkdir -p $out/bin
echo "#!${pkgs.python3}/bin/python3" >> $out/bin/timetagger
cat run.py >> $out/bin/timetagger
sed -Ei 's,0\.0\.0\.0:80,${addr}:${toString port},' $out/bin/timetagger
chmod +x $out/bin/timetagger
'';
}

View file

@ -10200,6 +10200,8 @@ with pkgs;
timetrap = callPackage ../applications/office/timetrap { };
timetagger = callPackage ../servers/timetagger { };
timekeeper = callPackage ../applications/office/timekeeper { };
timezonemap = callPackage ../development/libraries/timezonemap { };

View file

@ -9719,6 +9719,8 @@ in {
timeout-decorator = callPackage ../development/python-modules/timeout-decorator { };
timetagger = callPackage ../development/python-modules/timetagger { };
timezonefinder = callPackage ../development/python-modules/timezonefinder { };
tinycss2 = callPackage ../development/python-modules/tinycss2 { };