activitywatch: 0.12.2 -> 0.13.2 (#319121)
This commit is contained in:
commit
3f0954cb42
2957
pkgs/applications/office/activitywatch/Cargo.lock
generated
2957
pkgs/applications/office/activitywatch/Cargo.lock
generated
File diff suppressed because it is too large
Load Diff
@ -1,16 +1,13 @@
|
||||
diff --git a/vue.config.js b/vue.config.js
|
||||
index 02c0699..0c4a014 100644
|
||||
index d6fdd46..141d28f 100644
|
||||
--- a/vue.config.js
|
||||
+++ b/vue.config.js
|
||||
@@ -4,10 +4,7 @@ const CopyWebpackPlugin = require('copy-webpack-plugin');
|
||||
const { argv } = require('yargs');
|
||||
@@ -9,7 +9,7 @@ const __filename = fileURLToPath(import.meta.url); // get the resolved path to t
|
||||
const __dirname = path.dirname(__filename); // get the name of the directory
|
||||
|
||||
// get git info from command line
|
||||
-const _COMMIT_HASH = require('child_process')
|
||||
- .execSync('git rev-parse --short HEAD')
|
||||
- .toString()
|
||||
- .trim();
|
||||
-const _COMMIT_HASH = child_process.execSync('git rev-parse --short HEAD').toString().trim();
|
||||
+const _COMMIT_HASH = "@commit_hash@";
|
||||
console.info('Commit hash:', _COMMIT_HASH);
|
||||
|
||||
module.exports = {
|
||||
export default {
|
||||
|
@ -1,50 +1,53 @@
|
||||
{ lib
|
||||
, fetchFromGitHub
|
||||
, fetchpatch
|
||||
, rustPlatform
|
||||
, makeWrapper
|
||||
, pkg-config
|
||||
, perl
|
||||
, openssl
|
||||
, rust-jemalloc-sys
|
||||
, python3
|
||||
, wrapQtAppsHook
|
||||
, qtbase
|
||||
, qtsvg
|
||||
, xdg-utils
|
||||
, substituteAll
|
||||
, buildNpmPackage
|
||||
{
|
||||
lib,
|
||||
fetchFromGitHub,
|
||||
fetchpatch,
|
||||
rustPlatform,
|
||||
makeWrapper,
|
||||
pkg-config,
|
||||
perl,
|
||||
openssl,
|
||||
rust-jemalloc-sys,
|
||||
python3,
|
||||
python3Packages,
|
||||
wrapQtAppsHook,
|
||||
qtbase,
|
||||
qtsvg,
|
||||
xdg-utils,
|
||||
substituteAll,
|
||||
buildNpmPackage,
|
||||
}:
|
||||
|
||||
let
|
||||
version = "0.12.2";
|
||||
version = "0.13.2";
|
||||
sources = fetchFromGitHub {
|
||||
owner = "ActivityWatch";
|
||||
repo = "activitywatch";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-IvRXfxTOSgBVlxy4SVij+POr7KgvXTEjGN3lSozhHkY=";
|
||||
sha256 = "sha256-Z3WAg3b1zN0nS00u0zIose55JXRzQ7X7qy39XMY7Snk=";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
in
|
||||
rec {
|
||||
aw-watcher-afk = python3.pkgs.buildPythonApplication {
|
||||
aw-watcher-afk = python3Packages.buildPythonApplication {
|
||||
pname = "aw-watcher-afk";
|
||||
inherit version;
|
||||
|
||||
format = "pyproject";
|
||||
|
||||
src = "${sources}/aw-watcher-afk";
|
||||
|
||||
nativeBuildInputs = [
|
||||
python3.pkgs.poetry-core
|
||||
];
|
||||
pyproject = true;
|
||||
build-system = [ python3Packages.poetry-core ];
|
||||
|
||||
propagatedBuildInputs = with python3.pkgs; [
|
||||
dependencies = with python3Packages; [
|
||||
aw-client
|
||||
xlib
|
||||
pynput
|
||||
];
|
||||
|
||||
pythonRelaxDeps = [
|
||||
"python-xlib"
|
||||
];
|
||||
|
||||
pythonImportsCheck = [ "aw_watcher_afk" ];
|
||||
|
||||
meta = with lib; {
|
||||
@ -55,23 +58,24 @@ rec {
|
||||
};
|
||||
};
|
||||
|
||||
aw-watcher-window = python3.pkgs.buildPythonApplication {
|
||||
aw-watcher-window = python3Packages.buildPythonApplication {
|
||||
pname = "aw-watcher-window";
|
||||
inherit version;
|
||||
|
||||
format = "pyproject";
|
||||
|
||||
src = "${sources}/aw-watcher-window";
|
||||
|
||||
nativeBuildInputs = [
|
||||
python3.pkgs.poetry-core
|
||||
];
|
||||
pyproject = true;
|
||||
build-system = [ python3Packages.poetry-core ];
|
||||
|
||||
propagatedBuildInputs = with python3.pkgs; [
|
||||
dependencies = with python3Packages; [
|
||||
aw-client
|
||||
xlib
|
||||
];
|
||||
|
||||
pythonRelaxDeps = [
|
||||
"python-xlib"
|
||||
];
|
||||
|
||||
pythonImportsCheck = [ "aw_watcher_window" ];
|
||||
|
||||
meta = with lib; {
|
||||
@ -82,20 +86,16 @@ rec {
|
||||
};
|
||||
};
|
||||
|
||||
aw-qt = python3.pkgs.buildPythonApplication {
|
||||
aw-qt = python3Packages.buildPythonApplication {
|
||||
pname = "aw-qt";
|
||||
inherit version;
|
||||
|
||||
format = "pyproject";
|
||||
|
||||
src = "${sources}/aw-qt";
|
||||
|
||||
nativeBuildInputs = [
|
||||
python3.pkgs.poetry-core
|
||||
wrapQtAppsHook
|
||||
];
|
||||
pyproject = true;
|
||||
build-system = [ python3Packages.poetry-core ];
|
||||
|
||||
propagatedBuildInputs = with python3.pkgs; [
|
||||
dependencies = with python3Packages; [
|
||||
aw-core
|
||||
qtbase
|
||||
qtsvg # Rendering icons in the trayicon menu
|
||||
@ -103,6 +103,10 @@ rec {
|
||||
click
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
wrapQtAppsHook
|
||||
];
|
||||
|
||||
# Prevent double wrapping
|
||||
dontWrapQtApps = true;
|
||||
|
||||
@ -110,10 +114,6 @@ rec {
|
||||
"--suffix PATH : ${lib.makeBinPath [ xdg-utils ]}"
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
sed -E 's#PyQt6 = "6.3.1"#PyQt6 = "^6.4.0"#g' -i pyproject.toml
|
||||
'';
|
||||
|
||||
postInstall = ''
|
||||
install -D resources/aw-qt.desktop $out/share/applications/aw-qt.desktop
|
||||
|
||||
@ -143,21 +143,41 @@ rec {
|
||||
};
|
||||
};
|
||||
|
||||
aw-notify = python3Packages.buildPythonApplication {
|
||||
pname = "aw-notify";
|
||||
inherit version;
|
||||
|
||||
src = "${sources}/aw-notify";
|
||||
|
||||
pyproject = true;
|
||||
build-system = [ python3Packages.poetry-core ];
|
||||
|
||||
dependencies = with python3Packages; [
|
||||
aw-client
|
||||
desktop-notifier
|
||||
];
|
||||
|
||||
pythonRelaxDeps = [
|
||||
"desktop-notifier"
|
||||
];
|
||||
|
||||
pythonImportsCheck = [ "aw_notify" ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Desktop notification service for ActivityWatch";
|
||||
homepage = "https://github.com/ActivityWatch/aw-notify";
|
||||
maintainers = with maintainers; [ huantian ];
|
||||
license = licenses.mpl20;
|
||||
};
|
||||
};
|
||||
|
||||
aw-server-rust = rustPlatform.buildRustPackage {
|
||||
pname = "aw-server-rust";
|
||||
inherit version;
|
||||
|
||||
src = "${sources}/aw-server-rust";
|
||||
|
||||
cargoLock = {
|
||||
lockFile = ./Cargo.lock;
|
||||
outputHashes = {
|
||||
"rocket_cors-0.6.0-alpha1" = "sha256-GuMekgnsyuOg6lMiVvi4TwMba4sAFJ/zkgrdzSeBrv0=";
|
||||
};
|
||||
};
|
||||
|
||||
# Bypass rust nightly features not being available on rust stable
|
||||
RUSTC_BOOTSTRAP = 1;
|
||||
cargoHash = "sha256-2KnfLNVw48VVQ1Ec8MS2MaiA3BpGeFd/uIrJRHhaJR8=";
|
||||
|
||||
patches = [
|
||||
# Override version string with hardcoded value as it may be outdated upstream.
|
||||
@ -165,14 +185,6 @@ rec {
|
||||
src = ./override-version.patch;
|
||||
version = sources.rev;
|
||||
})
|
||||
|
||||
# Can be removed with release 0.12.3
|
||||
(fetchpatch {
|
||||
name = "remove-unused-unstable-features.patch";
|
||||
url = "https://github.com/ActivityWatch/aw-server-rust/commit/e1cd761d2f0a9309eb851b59732c2567a7ae2d3a.patch";
|
||||
hash = "sha256-wP+3XZDkr148XY5b8RV3obuLczAFBE3FhaYPqnmmGcU=";
|
||||
includes = [ "aw-server/src/lib.rs" ];
|
||||
})
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
@ -186,13 +198,7 @@ rec {
|
||||
rust-jemalloc-sys
|
||||
];
|
||||
|
||||
postFixup = ''
|
||||
wrapProgram "$out/bin/aw-server" \
|
||||
--prefix XDG_DATA_DIRS : "$out/share"
|
||||
|
||||
mkdir -p "$out/share/aw-server"
|
||||
ln -s "${aw-webui}" "$out/share/aw-server/static"
|
||||
'';
|
||||
env.AW_WEBUI_DIR = aw-webui;
|
||||
|
||||
preCheck = ''
|
||||
# Fake home folder for tests that use ~/.cache and ~/.local/share
|
||||
@ -215,7 +221,9 @@ rec {
|
||||
|
||||
src = "${sources}/aw-server-rust/aw-webui";
|
||||
|
||||
npmDepsHash = "sha256-yds2P2PKfTB6yUGnc+P73InV5+MZP9kmz2ZS4CRqlmA=";
|
||||
npmDepsHash = "sha256-fPk7UpKuO3nEN1w+cf9DIZIG1+XRUk6PJfVmtpC30XE=";
|
||||
|
||||
makeCacheWritable = true;
|
||||
|
||||
patches = [
|
||||
# Hardcode version to avoid the need to have the Git repo available at build time.
|
||||
@ -228,7 +236,7 @@ rec {
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
mv dist $out
|
||||
cp media/logo/logo.{png,svg} $out/static/
|
||||
mv media/logo/logo.{png,svg} $out
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
|
@ -1,10 +1,12 @@
|
||||
{ lib
|
||||
, symlinkJoin
|
||||
, aw-server-rust
|
||||
, aw-qt
|
||||
, aw-watcher-afk
|
||||
, aw-watcher-window
|
||||
, extraWatchers ? [ ]
|
||||
{
|
||||
lib,
|
||||
symlinkJoin,
|
||||
aw-server-rust,
|
||||
aw-qt,
|
||||
aw-notify,
|
||||
aw-watcher-afk,
|
||||
aw-watcher-window,
|
||||
extraWatchers ? [ ],
|
||||
}:
|
||||
|
||||
symlinkJoin {
|
||||
@ -12,7 +14,19 @@ symlinkJoin {
|
||||
paths = [
|
||||
aw-server-rust.out
|
||||
aw-qt.out
|
||||
aw-notify.out
|
||||
aw-watcher-afk.out
|
||||
aw-watcher-window.out
|
||||
] ++ (lib.forEach extraWatchers (p: p.out));
|
||||
|
||||
meta = with lib; {
|
||||
description = "The best free and open-source automated time tracker";
|
||||
homepage = "https://activitywatch.net/";
|
||||
downloadPage = "https://github.com/ActivityWatch/activitywatch/releases";
|
||||
changelog = "https://github.com/ActivityWatch/activitywatch/releases/tag/v${aw-server-rust.version}";
|
||||
maintainers = with maintainers; [ huantian ];
|
||||
mainProgram = "aw-qt";
|
||||
platforms = platforms.linux;
|
||||
license = licenses.mpl20;
|
||||
};
|
||||
}
|
||||
|
@ -27851,6 +27851,7 @@ with pkgs;
|
||||
|
||||
inherit (qt6Packages.callPackage ../applications/office/activitywatch { })
|
||||
aw-qt
|
||||
aw-notify
|
||||
aw-server-rust
|
||||
aw-watcher-afk
|
||||
aw-watcher-window;
|
||||
|
Loading…
Reference in New Issue
Block a user