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