2024-02-07 01:22:34 +00:00
|
|
|
{ lib
|
|
|
|
, fetchFromGitHub
|
|
|
|
, rustPlatform
|
|
|
|
, dbus
|
|
|
|
, pkg-config
|
|
|
|
}:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "ianny";
|
2024-06-05 15:53:02 +00:00
|
|
|
version = "1.0.0";
|
2024-02-07 01:22:34 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "zefr0x";
|
|
|
|
repo = "ianny";
|
|
|
|
rev = "v${version}";
|
2024-06-05 15:53:02 +00:00
|
|
|
hash = "sha256-1QkGs4qCzEA4K3H39QcRV+yINIeZRkjBBkASO69F7ik=";
|
2024-02-07 01:22:34 +00:00
|
|
|
};
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
cargoHash = "sha256-gKCmiqHkCB7nP5XIaFi/8Wi/x5WFEHEmHczKiIDDxXE=";
|
2024-02-07 01:22:34 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [ pkg-config ];
|
|
|
|
buildInputs = [ dbus.dev ];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace src/main.rs \
|
|
|
|
--replace-fail '/usr/share/locale' $out/share/locale
|
|
|
|
'';
|
|
|
|
|
|
|
|
preFixup = ''
|
|
|
|
mkdir -p $out/etc/xdg/autostart
|
|
|
|
mkdir -p $out/usr/share/local
|
|
|
|
cp io.github.zefr0x.ianny.desktop $out/etc/xdg/autostart/
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Desktop utility that helps preventing repetitive strain injuries by keeping track of usage patterns and periodically informing the user to take breaks";
|
2024-02-07 01:22:34 +00:00
|
|
|
homepage = "https://github.com/zefr0x/ianny";
|
|
|
|
license = licenses.gpl3;
|
|
|
|
mainProgram = "ianny";
|
|
|
|
maintainers = with maintainers; [ max-amb ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|