From 95917c20ab946ee544666fe86fbce46f38630b85 Mon Sep 17 00:00:00 2001 From: adisbladis Date: Thu, 23 Jan 2020 18:52:54 +0000 Subject: [PATCH] docbookrx: init at unstable-2018-05-02 --- pkgs/tools/typesetting/docbookrx/Gemfile | 2 + pkgs/tools/typesetting/docbookrx/Gemfile.lock | 15 +++++ pkgs/tools/typesetting/docbookrx/default.nix | 58 +++++++++++++++++++ pkgs/tools/typesetting/docbookrx/gemset.nix | 23 ++++++++ pkgs/top-level/all-packages.nix | 2 + 5 files changed, 100 insertions(+) create mode 100644 pkgs/tools/typesetting/docbookrx/Gemfile create mode 100644 pkgs/tools/typesetting/docbookrx/Gemfile.lock create mode 100644 pkgs/tools/typesetting/docbookrx/default.nix create mode 100644 pkgs/tools/typesetting/docbookrx/gemset.nix diff --git a/pkgs/tools/typesetting/docbookrx/Gemfile b/pkgs/tools/typesetting/docbookrx/Gemfile new file mode 100644 index 000000000000..73fee2920d5e --- /dev/null +++ b/pkgs/tools/typesetting/docbookrx/Gemfile @@ -0,0 +1,2 @@ +source 'https://rubygems.org' +gem 'nokogiri', '~> 1.8.0' diff --git a/pkgs/tools/typesetting/docbookrx/Gemfile.lock b/pkgs/tools/typesetting/docbookrx/Gemfile.lock new file mode 100644 index 000000000000..e1fbc2c94464 --- /dev/null +++ b/pkgs/tools/typesetting/docbookrx/Gemfile.lock @@ -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 diff --git a/pkgs/tools/typesetting/docbookrx/default.nix b/pkgs/tools/typesetting/docbookrx/default.nix new file mode 100644 index 000000000000..484e98fc88cb --- /dev/null +++ b/pkgs/tools/typesetting/docbookrx/default.nix @@ -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; + }; + +} diff --git a/pkgs/tools/typesetting/docbookrx/gemset.nix b/pkgs/tools/typesetting/docbookrx/gemset.nix new file mode 100644 index 000000000000..33a58845b221 --- /dev/null +++ b/pkgs/tools/typesetting/docbookrx/gemset.nix @@ -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"; + }; +} \ No newline at end of file diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 683cd1c08919..d43121553e80 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -2845,6 +2845,8 @@ in docbook2mdoc = callPackage ../tools/misc/docbook2mdoc { }; + docbookrx = callPackage ../tools/typesetting/docbookrx { }; + docear = callPackage ../applications/office/docear { }; dockbarx = callPackage ../applications/misc/dockbarx { };