summary refs log tree commit diff
path: root/pkgs/tools/system/facter
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/tools/system/facter')
-rw-r--r--pkgs/tools/system/facter/default.nix9
1 files changed, 7 insertions, 2 deletions
diff --git a/pkgs/tools/system/facter/default.nix b/pkgs/tools/system/facter/default.nix
index ffb85393b9a..9a95df94a1c 100644
--- a/pkgs/tools/system/facter/default.nix
+++ b/pkgs/tools/system/facter/default.nix
@@ -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;