diff options
author | Ingolf Wagner <contact@ingolf-wagner.de> | 2018-05-25 14:22:23 +0200 |
---|---|---|
committer | xeji <36407913+xeji@users.noreply.github.com> | 2018-05-25 14:22:23 +0200 |
commit | 6f193b4f903d00e05815504c9590fa2f6897b615 (patch) | |
tree | 4eadd95a841ad93e3f8c6a7e51d4f81e7abdbb3b /pkgs/applications/misc/memo | |
parent | 8b6ddc89dd280fa1324627f29c5623706aadc9ef (diff) |
memo: 0.2 -> 0.4 (#40697)
Diffstat (limited to 'pkgs/applications/misc/memo')
-rw-r--r-- | pkgs/applications/misc/memo/default.nix | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/pkgs/applications/misc/memo/default.nix b/pkgs/applications/misc/memo/default.nix index fc1c08dc2b2cb..56cbb338a4031 100644 --- a/pkgs/applications/misc/memo/default.nix +++ b/pkgs/applications/misc/memo/default.nix @@ -1,23 +1,34 @@ -{ fetchFromGitHub, ag, tree, stdenv, ... }: +{ fetchFromGitHub, ag, tree, man, stdenv, + pandocSupport ? true, pandoc ? null + , ... }: + +assert pandocSupport -> pandoc != null; stdenv.mkDerivation rec { name = "memo-${version}"; - version = "0.2"; + version = "0.4"; src = fetchFromGitHub { owner = "mrVanDalo"; repo = "memo"; rev = "${version}"; - sha256 = "0mww4w5m6jv4s0krm74cccrz0vlr8rrwiv122jk67l1v9r80pchs"; + sha256 = "06999nps46dxrjakvpin1d2zvfpjil69hb3bxagq29icalag3y2z"; }; - installPhase = '' + installPhase = let + pandocReplacement = if pandocSupport then + "pandoc_cmd=${pandoc}/bin/pandoc" + else + "#pandoc_cmd=pandoc"; + in '' mkdir -p $out/{bin,share/man/man1,share/bash-completion/completions} substituteInPlace memo \ - --replace "ack " "${ag}/bin/ag " \ - --replace "tree " "${tree}/bin/tree " + --replace "ack_cmd=ack" "ack_cmd=${ag}/bin/ag" \ + --replace "tree_cmd=tree" "tree_cmd=${tree}/bin/tree" \ + --replace "man_cmd=man" "man_cmd=${man}/bin/man" \ + --replace "pandoc_cmd=pandoc" "${pandocReplacement}" mv memo $out/bin/ mv doc/memo.1 $out/share/man/man1/memo.1 mv completion/memo.bash $out/share/bash-completion/completions/memo.sh |