2021-01-15 05:42:41 +00:00
|
|
|
{ fetchFromGitHub, silver-searcher, tree, man, lib, stdenv,
|
2018-08-10 07:02:53 +00:00
|
|
|
git,
|
2018-05-25 12:22:23 +00:00
|
|
|
pandocSupport ? true, pandoc ? null
|
|
|
|
, ... }:
|
|
|
|
|
|
|
|
assert pandocSupport -> pandoc != null;
|
2017-11-29 20:39:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "memo";
|
2017-11-29 20:39:52 +00:00
|
|
|
|
2019-07-13 16:22:39 +00:00
|
|
|
version = "0.8";
|
2017-11-29 20:39:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "mrVanDalo";
|
|
|
|
repo = "memo";
|
2019-09-08 23:38:31 +00:00
|
|
|
rev = version;
|
2019-07-13 16:22:39 +00:00
|
|
|
sha256 = "0azx2bx6y7j0637fg3m8zigcw09zfm2mw9wjfg218sx88cm1wdkp";
|
2017-11-29 20:39:52 +00:00
|
|
|
};
|
|
|
|
|
2018-05-25 12:22:23 +00:00
|
|
|
installPhase = let
|
|
|
|
pandocReplacement = if pandocSupport then
|
|
|
|
"pandoc_cmd=${pandoc}/bin/pandoc"
|
|
|
|
else
|
|
|
|
"#pandoc_cmd=pandoc";
|
|
|
|
in ''
|
2018-07-31 21:20:42 +00:00
|
|
|
mkdir -p $out/{bin,share/man/man1,share/bash-completion/completions,share/zsh/site-functions}
|
2018-02-12 03:05:09 +00:00
|
|
|
substituteInPlace memo \
|
2018-08-01 08:42:09 +00:00
|
|
|
--replace "ack_cmd=ack" "ack_cmd=${silver-searcher}/bin/ag" \
|
2018-05-25 12:22:23 +00:00
|
|
|
--replace "tree_cmd=tree" "tree_cmd=${tree}/bin/tree" \
|
|
|
|
--replace "man_cmd=man" "man_cmd=${man}/bin/man" \
|
2018-08-10 07:02:53 +00:00
|
|
|
--replace "git_cmd=git" "git_cmd=${git}/bin/git" \
|
2018-05-25 12:22:23 +00:00
|
|
|
--replace "pandoc_cmd=pandoc" "${pandocReplacement}"
|
2017-11-29 20:39:52 +00:00
|
|
|
mv memo $out/bin/
|
|
|
|
mv doc/memo.1 $out/share/man/man1/memo.1
|
2018-07-31 21:20:42 +00:00
|
|
|
mv completion/bash/memo.sh $out/share/bash-completion/completions/memo.sh
|
|
|
|
mv completion/zsh/_memo $out/share/zsh/site-functions/_memo
|
2017-11-29 20:39:52 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "A simple tool written in bash to memorize stuff";
|
|
|
|
longDescription = ''
|
|
|
|
A simple tool written in bash to memorize stuff.
|
|
|
|
Memo organizes is structured through topics which are folders in ~/memo.
|
|
|
|
'';
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "http://palovandalo.com/memo/";
|
|
|
|
downloadPage = "https://github.com/mrVanDalo/memo/releases";
|
2021-01-15 05:42:41 +00:00
|
|
|
license = lib.licenses.gpl3;
|
|
|
|
maintainers = [ lib.maintainers.mrVanDalo ];
|
|
|
|
platforms = lib.platforms.all;
|
2017-11-29 20:39:52 +00:00
|
|
|
};
|
2018-02-12 03:05:09 +00:00
|
|
|
}
|