biome: 1.9.2 -> 1.9.3
[NixPkgs.git] / pkgs / applications / misc / memo / default.nix
blobc6d9c58b0ad627880a443e1c64ea7875e4e0a769
1 { fetchFromGitHub, silver-searcher, tree, man, lib, stdenv,
2   git,
3   pandocSupport ? true, pandoc ? null
4   , ... }:
6 assert pandocSupport -> pandoc != null;
8 stdenv.mkDerivation rec {
10   pname = "memo";
12   version = "0.8";
14   src = fetchFromGitHub {
15     owner  = "mrVanDalo";
16     repo   = "memo";
17     rev    = version;
18     sha256 = "0azx2bx6y7j0637fg3m8zigcw09zfm2mw9wjfg218sx88cm1wdkp";
19   };
21   installPhase = let
22     pandocReplacement = if pandocSupport then
23       "pandoc_cmd=${pandoc}/bin/pandoc"
24     else
25       "#pandoc_cmd=pandoc";
26   in ''
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}"
34     mv memo $out/bin/
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
38   '';
40   meta = {
41     description = "Simple tool written in bash to memorize stuff";
42     longDescription = ''
43       A simple tool written in bash to memorize stuff.
44       Memo organizes is structured through topics which are folders in ~/memo.
45     '';
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;
51     mainProgram = "memo";
52   };