summary refs log tree commit diff
path: root/pkgs/development/ruby-modules/gem-config
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2020-01-06 23:06:59 +0000
committerAlyssa Ross <hi@alyssa.is>2020-01-09 15:55:02 +0000
commit1ac11cc1c1858af1cef725d68cacf7102366e588 (patch)
tree5e64d78d75fdf543a3a1c1f6c7e2372662e69ff7 /pkgs/development/ruby-modules/gem-config
parentfbe4716bd516587e5f294873e66c33a68225255a (diff)
downloadnixpkgs-1ac11cc1c1858af1cef725d68cacf7102366e588.tar
nixpkgs-1ac11cc1c1858af1cef725d68cacf7102366e588.tar.gz
nixpkgs-1ac11cc1c1858af1cef725d68cacf7102366e588.tar.bz2
nixpkgs-1ac11cc1c1858af1cef725d68cacf7102366e588.tar.lz
nixpkgs-1ac11cc1c1858af1cef725d68cacf7102366e588.tar.xz
nixpkgs-1ac11cc1c1858af1cef725d68cacf7102366e588.tar.zst
nixpkgs-1ac11cc1c1858af1cef725d68cacf7102366e588.zip
defaultGemConfig: remove asciidoctor-diagram JARs
(Except on JRuby, where these are presumably important.)
Diffstat (limited to 'pkgs/development/ruby-modules/gem-config')
-rw-r--r--pkgs/development/ruby-modules/gem-config/default.nix9
1 files changed, 9 insertions, 0 deletions
diff --git a/pkgs/development/ruby-modules/gem-config/default.nix b/pkgs/development/ruby-modules/gem-config/default.nix
index 4d7ddf549c3..088bcedf6de 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 ];