bashblog: init at unstable-2022-03-26

+86
+25
pkgs/tools/text/bashblog/0001-Setting-markdown_bin.patch
··· 1 + From 1990ac93c9dbf3ada0eb2f045ef1aa95bbef7018 Mon Sep 17 00:00:00 2001 2 + From: "P. R. d. O" <d.ol.rod@tutanota.com> 3 + Date: Thu, 21 Apr 2022 07:40:30 -0600 4 + Subject: [PATCH] Setting markdown_bin 5 + 6 + --- 7 + bb.sh | 2 +- 8 + 1 file changed, 1 insertion(+), 1 deletion(-) 9 + 10 + diff --git a/bb.sh b/bb.sh 11 + index 9d8e645..40fb54d 100755 12 + --- a/bb.sh 13 + +++ b/bb.sh 14 + @@ -160,7 +160,7 @@ global_variables() { 15 + 16 + # Markdown location. Trying to autodetect by default. 17 + # The invocation must support the signature 'markdown_bin in.md > out.html' 18 + - [[ -f Markdown.pl ]] && markdown_bin=./Markdown.pl || markdown_bin=$(which Markdown.pl 2>/dev/null || which markdown 2>/dev/null) 19 + + markdown_bin=@markdown_path@ 20 + } 21 + 22 + # Check for the validity of some variables 23 + -- 24 + 2.35.1 25 +
+59
pkgs/tools/text/bashblog/default.nix
··· 1 + { stdenv 2 + , lib 3 + , fetchzip 4 + , fetchFromGitHub 5 + , makeWrapper 6 + , substituteAll 7 + , perlPackages 8 + # Flags to enable processors 9 + # Currently, Markdown.pl does not work 10 + , usePandoc ? true 11 + , pandoc }: 12 + 13 + let 14 + inherit (perlPackages) TextMarkdown; 15 + # As bashblog supports various markdown processors 16 + # we can set flags to enable a certain processor 17 + markdownpl_path = "${perlPackages.TextMarkdown}/bin/Markdown.pl"; 18 + pandoc_path = "${pandoc}/bin/pandoc"; 19 + 20 + in stdenv.mkDerivation rec { 21 + pname = "bashblog"; 22 + version = "unstable-2022-03-26"; 23 + 24 + src = fetchFromGitHub { 25 + owner = "cfenollosa"; 26 + repo = "bashblog"; 27 + rev = "c3d4cc1d905560ecfefce911c319469f7a7ff8a8"; 28 + sha256 = "sha256-THlP/JuaZzDq9QctidwLRiUVFxRhGNhRKleWbQiqsgg="; 29 + }; 30 + 31 + nativeBuildInputs = [ makeWrapper ]; 32 + 33 + buildInputs = [ TextMarkdown ] 34 + ++ lib.optionals usePandoc [ pandoc ]; 35 + 36 + patches = [ 37 + (substituteAll { 38 + src = ./0001-Setting-markdown_bin.patch; 39 + markdown_path = if usePandoc then pandoc_path else markdownpl_path; 40 + }) 41 + ]; 42 + 43 + postPatch = '' 44 + patchShebangs bb.sh 45 + ''; 46 + 47 + installPhase = '' 48 + mkdir -p $out/bin 49 + install -Dm755 bb.sh $out/bin/bashblog 50 + ''; 51 + 52 + meta = with lib; { 53 + description = "A single Bash script to create blogs"; 54 + homepage = "https://github.com/cfenollosa/bashblog"; 55 + license = licenses.gpl3Only; 56 + platforms = platforms.unix; 57 + maintainers = with maintainers; [ wolfangaukang ]; 58 + }; 59 + }
+2
pkgs/top-level/all-packages.nix
··· 1853 1853 1854 1854 awless = callPackage ../tools/virtualization/awless { }; 1855 1855 1856 + bashblog = callPackage ../tools/text/bashblog { }; 1857 + 1856 1858 berglas = callPackage ../tools/admin/berglas { }; 1857 1859 1858 1860 betterdiscordctl = callPackage ../tools/misc/betterdiscordctl { };