nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at netboot-syslinux-multiplatform 52 lines 1.7 kB view raw
1{ fetchFromGitHub, silver-searcher, tree, man, lib, stdenv, 2 git, 3 pandocSupport ? true, pandoc ? null 4 , ... }: 5 6assert pandocSupport -> pandoc != null; 7 8stdenv.mkDerivation rec { 9 10 pname = "memo"; 11 12 version = "0.8"; 13 14 src = fetchFromGitHub { 15 owner = "mrVanDalo"; 16 repo = "memo"; 17 rev = version; 18 sha256 = "0azx2bx6y7j0637fg3m8zigcw09zfm2mw9wjfg218sx88cm1wdkp"; 19 }; 20 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 ''; 39 40 meta = { 41 description = "A 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 }; 52}