timetagger: unbreak

This commit is contained in:
Weijia Wang 2023-07-10 11:09:58 +03:00
parent ad2af572f8
commit bfb26144e7
2 changed files with 4 additions and 6 deletions

View file

@ -59,6 +59,5 @@ buildPythonPackage rec {
changelog = "https://github.com/almarklein/timetagger/releases/tag/v${version}";
license = licenses.gpl3Only;
maintainers = with maintainers; [ matthiasbeyer ];
broken = stdenv.isDarwin;
};
}

View file

@ -1,6 +1,4 @@
{ lib
, python3
, fetchFromGitHub
{ python3
, addr ? "127.0.0.1"
, port ? 8082
@ -24,9 +22,10 @@ python3.pkgs.buildPythonApplication {
installPhase = ''
mkdir -p $out/bin
echo "#!${python3.interpreter}" >> $out/bin/timetagger
cat run.py >> $out/bin/timetagger
sed -Ei 's,0\.0\.0\.0:80,${addr}:${toString port},' $out/bin/timetagger
cat timetagger/__main__.py >> $out/bin/timetagger
chmod +x $out/bin/timetagger
wrapProgram $out/bin/timetagger \
--set TIMETAGGER_BIND "${addr}:${toString port}"
'';
}