2021-01-11 07:54:33 +00:00
|
|
|
{ lib, stdenv
|
2020-04-05 00:14:08 +01:00
|
|
|
, rustPlatform
|
|
|
|
, fetchFromGitHub
|
|
|
|
, pkg-config
|
|
|
|
, openssl
|
|
|
|
, gtk3
|
2020-09-30 11:30:51 +01:00
|
|
|
, rust
|
2020-04-05 00:14:08 +01:00
|
|
|
}:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "effitask";
|
|
|
|
version = "1.4.0";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "sanpii";
|
2020-11-01 22:39:49 +00:00
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2020-04-05 00:14:08 +01:00
|
|
|
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
|
2020-09-30 11:30:51 +01:00
|
|
|
make install PREFIX="$out" TARGET="target/${rust.toRustTarget stdenv.hostPlatform}/release/effitask"
|
2020-04-05 00:14:08 +01:00
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-04-05 00:14:08 +01:00
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|