depot/third_party/nixpkgs/pkgs/by-name/ia/ianny/package.nix
Default email bcb2f287e1 Project import generated by Copybara.
GitOrigin-RevId: d603719ec6e294f034936c0d0dc06f689d91b6c3
2024-06-20 20:27:18 +05:30

43 lines
1.1 KiB
Nix

{ lib
, fetchFromGitHub
, rustPlatform
, dbus
, pkg-config
}:
rustPlatform.buildRustPackage rec {
pname = "ianny";
version = "1.0.0";
src = fetchFromGitHub {
owner = "zefr0x";
repo = "ianny";
rev = "v${version}";
hash = "sha256-1QkGs4qCzEA4K3H39QcRV+yINIeZRkjBBkASO69F7ik=";
};
cargoHash = "sha256-gKCmiqHkCB7nP5XIaFi/8Wi/x5WFEHEmHczKiIDDxXE=";
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; {
description = "Desktop utility that helps preventing repetitive strain injuries by keeping track of usage patterns and periodically informing the user to take breaks";
homepage = "https://github.com/zefr0x/ianny";
license = licenses.gpl3;
mainProgram = "ianny";
maintainers = with maintainers; [ max-amb ];
platforms = platforms.linux;
};
}