gem-config: set libmagic for magic

This commit is contained in:
Maximilian Güntner 2018-10-23 16:09:43 +02:00 committed by Robin Gloster
parent c67ccd34c0
commit 5b1e005bb6

View file

@ -22,7 +22,7 @@
, pkgconfig , ncurses, xapian_1_2_22, gpgme, utillinux, fetchpatch, tzdata, icu, libffi
, cmake, libssh2, openssl, mysql, darwin, git, perl, pcre, gecode_3, curl
, msgpack, qt48, libsodium, snappy, libossp_uuid, lxc, libpcap, xorg, gtk2, buildRubyGem
, cairo, re2, rake, gobjectIntrospection, gdk_pixbuf, zeromq, graphicsmagick, libcxx
, cairo, re2, rake, gobjectIntrospection, gdk_pixbuf, zeromq, graphicsmagick, libcxx, file
}@args:
let
@ -218,6 +218,14 @@ in
];
};
magic = attrs: {
buildInputs = [ file ];
postInstall = ''
installPath=$(cat $out/nix-support/gem-meta/install-path)
sed -e 's@ENV\["MAGIC_LIB"\] ||@ENV\["MAGIC_LIB"\] || "${file}/lib/libmagic.so" ||@' -i $installPath/lib/magic/api.rb
'';
};
msgpack = attrs: {
buildInputs = [ msgpack ];
};