summaryrefslogtreecommitdiffstats
path: root/pkgs/by-name/ef/effitask/package.nix
blob: 11ea7bf263fed49dca2fb4246c330258bfabd20e (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
52
53
{
  lib,
  rustPlatform,
  fetchFromGitHub,
  pkg-config,
  openssl,
  gtk3,
  stdenv,
}:

rustPlatform.buildRustPackage (finalAttrs: {
  pname = "effitask";
  version = "1.4.2";

  src = fetchFromGitHub {
    owner = "todotxt-rs";
    repo = "effitask";
    rev = finalAttrs.version;
    sha256 = "sha256-6BA/TCCqVh5rtgGkUgk8nIqUzozipC5rrkbXMDWYpdQ=";
  };

  cargoHash = "sha256-j9WCzsh6aitmJeeyLDm0YrZHEAZlCNfGWANM/nmuncw=";

  nativeBuildInputs = [ pkg-config ];

  buildInputs = [
    openssl
    gtk3
  ];

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

  meta = {
    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/todotxt-rs/effitask";
    maintainers = with lib.maintainers; [ davidak ];
    license = lib.licenses.mit;
    mainProgram = "effitask";
  };
})