summary refs log tree commit diff
diff options
context:
space:
mode:
authorDoron Behar <doron.behar@gmail.com>2022-08-12 15:06:08 +0300
committerGitHub <noreply@github.com>2022-08-12 15:06:08 +0300
commitc4a0efdd5a728e20791b8d8d2f26f90ac228ee8d (patch)
tree620ad3ddd4c1583dc14f90b2aada3e1e072b6929
parent5538d7aec62b40e0a87b6c3573f782700cf0d7e6 (diff)
parent7b7966a3b2bdbb3ffb132e578eb7a0a9fd0d9211 (diff)
downloadnixpkgs-c4a0efdd5a728e20791b8d8d2f26f90ac228ee8d.tar
nixpkgs-c4a0efdd5a728e20791b8d8d2f26f90ac228ee8d.tar.gz
nixpkgs-c4a0efdd5a728e20791b8d8d2f26f90ac228ee8d.tar.bz2
nixpkgs-c4a0efdd5a728e20791b8d8d2f26f90ac228ee8d.tar.lz
nixpkgs-c4a0efdd5a728e20791b8d8d2f26f90ac228ee8d.tar.xz
nixpkgs-c4a0efdd5a728e20791b8d8d2f26f90ac228ee8d.tar.zst
nixpkgs-c4a0efdd5a728e20791b8d8d2f26f90ac228ee8d.zip
Merge pull request #185816 from AndrewKvalheim/asciidoctor-with-extensions/java
asciidoctor-with-extensions: add Java dependency
-rw-r--r--pkgs/tools/typesetting/asciidoctor-with-extensions/default.nix13
1 files changed, 12 insertions, 1 deletions
diff --git a/pkgs/tools/typesetting/asciidoctor-with-extensions/default.nix b/pkgs/tools/typesetting/asciidoctor-with-extensions/default.nix
index c4aa7fa4a27..e31ce69baa1 100644
--- a/pkgs/tools/typesetting/asciidoctor-with-extensions/default.nix
+++ b/pkgs/tools/typesetting/asciidoctor-with-extensions/default.nix
@@ -2,9 +2,13 @@
 , bundlerApp
 , bundlerUpdateScript
 , makeWrapper
+, withJava ? true, jre # Used by asciidoctor-diagram for ditaa and PlantUML
 }:
 
-bundlerApp {
+let
+  path = lib.makeBinPath (lib.optional withJava jre);
+in
+bundlerApp rec {
   pname = "asciidoctor";
   gemdir = ./.;
 
@@ -16,6 +20,13 @@ bundlerApp {
     "asciidoctor-revealjs"
   ];
 
+  buildInputs = [ makeWrapper ];
+
+  postBuild = lib.optionalString (path != "") (lib.concatMapStrings (exe: ''
+    wrapProgram $out/bin/${exe} \
+      --prefix PATH : ${path}
+  '') exes);
+
   passthru = {
     updateScript = bundlerUpdateScript "asciidoctor-with-extensions";
   };