From 1ac11cc1c1858af1cef725d68cacf7102366e588 Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Mon, 6 Jan 2020 23:06:59 +0000 Subject: [PATCH] defaultGemConfig: remove asciidoctor-diagram JARs (Except on JRuby, where these are presumably important.) --- pkgs/development/ruby-modules/gem-config/default.nix | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pkgs/development/ruby-modules/gem-config/default.nix b/pkgs/development/ruby-modules/gem-config/default.nix index 4d7ddf549c32..088bcedf6de3 100644 --- a/pkgs/development/ruby-modules/gem-config/default.nix +++ b/pkgs/development/ruby-modules/gem-config/default.nix @@ -39,6 +39,15 @@ let in { + asciidoctor-diagram = { version, ruby, ... }: { + postInstall = '' + # Delete vendored JAR files unless using JRuby. + if ruby -e 'exit(RUBY_PLATFORM != "java")'; then + rm -v $out/${ruby.gemPath}/gems/$gemName-${version}/lib/*.jar + fi + ''; + }; + atk = attrs: { dependencies = attrs.dependencies ++ [ "gobject-introspection" ]; nativeBuildInputs = [ rake bundler pkgconfig ];