aboutsummaryrefslogtreecommitdiff
path: root/infra/libkookie/nixpkgs/pkgs/applications/misc/effitask/default.nix
blob: 4f3255551c21abff8523e310c4ce1e481f4d11fc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
{ stdenv
, rustPlatform
, fetchFromGitHub
, pkg-config
, openssl
, gtk3
, rust
}:

rustPlatform.buildRustPackage rec {
  pname = "effitask";
  version = "1.4.0";

  src = fetchFromGitHub {
    owner = "sanpii";
    repo = "${pname}";
    rev = "${version}";
    sha256 = "09bffxdp43s8b1rpmsgqr2kyz3i4jbd2yrwbxw21fj3sf3mwb9ig";
  };

  # workaround for missing Cargo.lock file https://github.com/sanpii/effitask/issues/48
  cargoPatches = [ ./cargo-lock.patch ];

  cargoSha256 = "0dvmp23kny6rlv6c0mfyy3cmz1bi5wcm1mxps4z67lym5kxfd362";

  buildInputs = [ openssl gtk3 ];

  nativeBuildInputs = [ pkg-config ];

  # default installPhase don't install assets
  installPhase = ''
    runHook preInstall
    make install PREFIX="$out" TARGET="target/${rust.toRustTarget stdenv.hostPlatform}/release/effitask"
    runHook postInstall
  '';

  meta = with stdenv.lib; {
    description = "Graphical task manager, based on the todo.txt format";
    longDescription = ''
      To use it as todo.sh add-on, create a symlink like this:
      mkdir ~/.todo.actions.d/
      ln -s $(which effitask) ~/.todo.actions.d/et

      Or use it as standalone program by defining some environment variables
      like described in the projects readme.
    '';
    homepage = "https://github.com/sanpii/effitask";
    maintainers = with maintainers; [ davidak ];
    license = with licenses; [ mit ];
  };
}