sqlite_orm: 1.9 -> 1.9.1 (#379250)
[NixPkgs.git] / pkgs / by-name / ia / ianny / package.nix
blob2c56c8b0e77cb6ffae90e4de29abd21a599b07e0
2   lib,
3   fetchFromGitHub,
4   rustPlatform,
5   dbus,
6   pkg-config,
7 }:
9 rustPlatform.buildRustPackage rec {
10   pname = "ianny";
11   version = "2.0.0";
13   src = fetchFromGitHub {
14     owner = "zefr0x";
15     repo = "ianny";
16     rev = "v${version}";
17     hash = "sha256-F8Uc2BsQ5f7yaUXXDhLvyyYKUDAuvP9cCR2h3vblr0g=";
18   };
20   cargoHash = "sha256-b3B1LMa3gIL2xF9GL7jLXagesC9FEQHb8drocgx2MqY=";
22   nativeBuildInputs = [ pkg-config ];
23   buildInputs = [ dbus.dev ];
25   postPatch = ''
26     substituteInPlace src/main.rs \
27       --replace-fail '/usr/share/locale' $out/share/locale
28   '';
30   preFixup = ''
31     mkdir -p $out/etc/xdg/autostart
32     mkdir -p $out/usr/share/local
33     cp io.github.zefr0x.ianny.desktop $out/etc/xdg/autostart/
34   '';
36   meta = with lib; {
37     description = "Desktop utility that helps preventing repetitive strain injuries by keeping track of usage patterns and periodically informing the user to take breaks";
38     homepage = "https://github.com/zefr0x/ianny";
39     license = licenses.gpl3;
40     mainProgram = "ianny";
41     maintainers = with maintainers; [ max-amb ];
42     platforms = platforms.linux;
43   };