Merge pull request #78389 from adisbladis/docbook-tools

docbookrx & kramdown-asciidoc: init
This commit is contained in:
Marek Mahut 2020-02-13 10:03:02 +01:00 committed by GitHub
commit 87715811a2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 179 additions and 0 deletions

View File

@ -0,0 +1,2 @@
source 'https://rubygems.org'
gem 'nokogiri', '~> 1.8.0'

View File

@ -0,0 +1,15 @@
GEM
remote: https://rubygems.org/
specs:
mini_portile2 (2.3.0)
nokogiri (1.8.5)
mini_portile2 (~> 2.3.0)
PLATFORMS
ruby
DEPENDENCIES
nokogiri (~> 1.8.0)
BUNDLED WITH
1.17.3

View File

@ -0,0 +1,58 @@
{ lib
, fetchFromGitHub
, stdenv
, ruby
, bundlerEnv
# , libxml2
}:
let
env = bundlerEnv {
name = "docbookrx-env";
gemdir = ./.;
inherit ruby;
# buildInputs = [
# libxml2
# ];
gemfile = ./Gemfile;
lockfile = ./Gemfile.lock;
gemset = ./gemset.nix;
};
in stdenv.mkDerivation {
pname = "docbookrx";
version = "unstable-2018-05-02";
buildInputs = [ env.wrappedRuby ];
src = fetchFromGitHub {
owner = "asciidoctor";
repo = "docbookrx";
rev = "682d8c2f7a9e1e6f546c5f7d0067353621c68a7a";
sha256 = "07jilh17gj8xx4ps4ln787izmhv8xwwwv6fkqqg3pwjni5qikx7w";
};
# TODO: I don't know ruby packaging but this does the trick for now
installPhase = ''
runHook preInstall
mkdir -p $out/bin
cp -a bin/docbookrx $out/bin
cp -a lib $out
runHook postInstall
'';
meta = with lib; {
description = "(An early version of) a DocBook to AsciiDoc converter written in Ruby.";
homepage = https://asciidoctor.org/;
license = licenses.mit;
maintainers = with maintainers; [ ];
platforms = platforms.unix;
};
}

View File

@ -0,0 +1,23 @@
{
mini_portile2 = {
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "13d32jjadpjj6d2wdhkfpsmy68zjx90p49bgf8f7nkpz86r1fr11";
type = "gem";
};
version = "2.3.0";
};
nokogiri = {
dependencies = ["mini_portile2"];
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "0byyxrazkfm29ypcx5q4syrv126nvjnf7z6bqi01sqkv4llsi4qz";
type = "gem";
};
version = "1.8.5";
};
}

View File

@ -0,0 +1,2 @@
source 'https://rubygems.org'
gem 'kramdown-asciidoc'

View File

@ -0,0 +1,15 @@
GEM
remote: https://rubygems.org/
specs:
kramdown (1.17.0)
kramdown-asciidoc (1.0.1)
kramdown (~> 1.17.0)
PLATFORMS
ruby
DEPENDENCIES
kramdown-asciidoc
BUNDLED WITH
1.17.3

View File

@ -0,0 +1,37 @@
{ lib, bundlerApp, makeWrapper,
# Optional dependencies, can be null
epubcheck, kindlegen,
bundlerUpdateScript
}:
let
app = bundlerApp {
pname = "kramdown-asciidoc";
gemdir = ./.;
exes = [
"kramdoc"
];
# buildInputs = [ makeWrapper ];
# postBuild = ''
# wrapProgram "$out/bin/asciidoctor-epub3" \
# ${lib.optionalString (epubcheck != null) "--set EPUBCHECK ${epubcheck}/bin/epubcheck"} \
# ${lib.optionalString (kindlegen != null) "--set KINDLEGEN ${kindlegen}/bin/kindlegen"}
# '';
# passthru = {
# updateScript = bundlerUpdateScript "kramdown-asciidoc";
# };
meta = with lib; {
description = "A kramdown extension for converting Markdown documents to AsciiDoc.";
homepage = https://asciidoctor.org/;
license = licenses.mit;
maintainers = with maintainers; [ ];
platforms = platforms.unix;
};
};
in
app

View File

@ -0,0 +1,23 @@
{
kramdown = {
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "1n1c4jmrh5ig8iv1rw81s4mw4xsp4v97hvf8zkigv4hn5h542qjq";
type = "gem";
};
version = "1.17.0";
};
kramdown-asciidoc = {
dependencies = ["kramdown"];
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "1nr4hss1byhchwkqy2w0dgc7s83n0s5xm0pjms2cmckc4sbrryxi";
type = "gem";
};
version = "1.0.1";
};
}

View File

@ -2864,6 +2864,8 @@ in
docbook2mdoc = callPackage ../tools/misc/docbook2mdoc { };
docbookrx = callPackage ../tools/typesetting/docbookrx { };
docear = callPackage ../applications/office/docear { };
dockbarx = callPackage ../applications/misc/dockbarx { };
@ -2983,6 +2985,8 @@ in
ssh = openssh;
};
kramdown-asciidoc = callPackage ../tools/typesetting/kramdown-asciidoc { };
mcrcon = callPackage ../tools/networking/mcrcon {};
rage = callPackage ../tools/security/rage {