30 lines
987 B
Nix
30 lines
987 B
Nix
{ lib, stdenvNoCC, makeWrapper, python3, nodejs-slim }:
|
|
|
|
stdenvNoCC.mkDerivation {
|
|
pname = "flowtrack";
|
|
version = "1.3.0";
|
|
src = ./.;
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
installPhase = ''
|
|
runHook preInstall
|
|
mkdir -p $out/share/flowtrack $out/bin
|
|
cp app.py notify.js $out/share/flowtrack/
|
|
cp -r static $out/share/flowtrack/static
|
|
# node:sqlite still prints an ExperimentalWarning on every start.
|
|
makeWrapper ${nodejs-slim}/bin/node $out/bin/flowtrack-notify \
|
|
--add-flags "--disable-warning=ExperimentalWarning $out/share/flowtrack/notify.js"
|
|
makeWrapper ${python3}/bin/python3 $out/bin/flowtrack \
|
|
--add-flags "$out/share/flowtrack/app.py" \
|
|
--set-default FLOWTRACK_NOTIFY $out/bin/flowtrack-notify
|
|
runHook postInstall
|
|
'';
|
|
|
|
meta = {
|
|
description = "Private, self-hosted period tracker with cycle predictions";
|
|
license = lib.licenses.mit;
|
|
platforms = lib.platforms.linux;
|
|
mainProgram = "flowtrack";
|
|
};
|
|
}
|