facter: ruby support

This commit is contained in:
Kranium Gikos Mendoza 2016-05-22 17:09:13 +08:00
parent 7c4438dcf9
commit ccb3ade7c2
2 changed files with 10 additions and 3 deletions

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, boost, cmake, curl, leatherman, libyamlcpp, openssl, utillinux }:
{ stdenv, fetchurl, boost, cmake, curl, leatherman, libyamlcpp, openssl, ruby, utillinux }:
stdenv.mkDerivation rec {
name = "facter-${version}";
@ -8,9 +8,14 @@ stdenv.mkDerivation rec {
sha256 = "1kv4k9zqpsiw362kk1rw1a4sixd0pmnh57ghd4k4pffr2dkmdfsv";
};
cmakeFlags = [ "-DFACTER_RUBY=${ruby}/lib/libruby.so" ];
# since we cant expand $out in cmakeFlags
preConfigure = "cmakeFlags+=\" -DRUBY_LIB_INSTALL=$out/lib/ruby\"";
libyamlcpp_ = libyamlcpp.override { makePIC = true; };
buildInputs = [ boost cmake curl leatherman libyamlcpp_ openssl utillinux ];
buildInputs = [ boost cmake curl leatherman libyamlcpp_ openssl ruby utillinux ];
meta = with stdenv.lib; {
homepage = https://github.com/puppetlabs/facter;

View File

@ -781,7 +781,9 @@ in
ent = callPackage ../tools/misc/ent { };
facter = callPackage ../tools/system/facter {};
facter = callPackage ../tools/system/facter {
ruby = ruby_2_1;
};
fasd = callPackage ../tools/misc/fasd { };