1 { fetchFromGitHub, silver-searcher, tree, man, lib, stdenv,
3 pandocSupport ? true, pandoc ? null
6 assert pandocSupport -> pandoc != null;
8 stdenv.mkDerivation rec {
14 src = fetchFromGitHub {
18 sha256 = "0azx2bx6y7j0637fg3m8zigcw09zfm2mw9wjfg218sx88cm1wdkp";
22 pandocReplacement = if pandocSupport then
23 "pandoc_cmd=${pandoc}/bin/pandoc"
27 mkdir -p $out/{bin,share/man/man1,share/bash-completion/completions,share/zsh/site-functions}
28 substituteInPlace memo \
29 --replace "ack_cmd=ack" "ack_cmd=${silver-searcher}/bin/ag" \
30 --replace "tree_cmd=tree" "tree_cmd=${tree}/bin/tree" \
31 --replace "man_cmd=man" "man_cmd=${man}/bin/man" \
32 --replace "git_cmd=git" "git_cmd=${git}/bin/git" \
33 --replace "pandoc_cmd=pandoc" "${pandocReplacement}"
35 mv doc/memo.1 $out/share/man/man1/memo.1
36 mv completion/bash/memo.sh $out/share/bash-completion/completions/memo.sh
37 mv completion/zsh/_memo $out/share/zsh/site-functions/_memo
41 description = "Simple tool written in bash to memorize stuff";
43 A simple tool written in bash to memorize stuff.
44 Memo organizes is structured through topics which are folders in ~/memo.
46 homepage = "http://palovandalo.com/memo/";
47 downloadPage = "https://github.com/mrVanDalo/memo/releases";
48 license = lib.licenses.gpl3;
49 maintainers = [ lib.maintainers.mrVanDalo ];
50 platforms = lib.platforms.all;