summary refs log tree commit diff
path: root/pkgs/tools/system/facter
diff options
context:
space:
mode:
authorMario Rodas <marsam@users.noreply.github.com>2020-07-04 04:23:00 -0500
committerMario Rodas <marsam@users.noreply.github.com>2020-07-04 04:23:00 -0500
commit951a5bcc7ab91d2a57b2322a777212b5feb2c6bc (patch)
treef6ceb2fb159e651fd77b5a7b1a0cff4b38c804c1 /pkgs/tools/system/facter
parent2380e153a324eb87acc4591e68f27cd6923df76a (diff)
downloadnixpkgs-951a5bcc7ab91d2a57b2322a777212b5feb2c6bc.tar
nixpkgs-951a5bcc7ab91d2a57b2322a777212b5feb2c6bc.tar.gz
nixpkgs-951a5bcc7ab91d2a57b2322a777212b5feb2c6bc.tar.bz2
nixpkgs-951a5bcc7ab91d2a57b2322a777212b5feb2c6bc.tar.lz
nixpkgs-951a5bcc7ab91d2a57b2322a777212b5feb2c6bc.tar.xz
nixpkgs-951a5bcc7ab91d2a57b2322a777212b5feb2c6bc.tar.zst
nixpkgs-951a5bcc7ab91d2a57b2322a777212b5feb2c6bc.zip
facter: enable on darwin
Diffstat (limited to 'pkgs/tools/system/facter')
-rw-r--r--pkgs/tools/system/facter/default.nix10
1 files changed, 5 insertions, 5 deletions
diff --git a/pkgs/tools/system/facter/default.nix b/pkgs/tools/system/facter/default.nix
index b6a04f808a4..a4065cce864 100644
--- a/pkgs/tools/system/facter/default.nix
+++ b/pkgs/tools/system/facter/default.nix
@@ -11,15 +11,15 @@ stdenv.mkDerivation rec {
     owner = "puppetlabs";
   };
 
-  CXXFLAGS = "-fpermissive -Wno-error=catch-value";
-  NIX_LDFLAGS = "-lblkid";
+  CXXFLAGS = stdenv.lib.optionalString stdenv.cc.isGNU "-fpermissive -Wno-error=catch-value";
+  NIX_LDFLAGS = stdenv.lib.optionalString stdenv.isLinux "-lblkid";
 
   cmakeFlags = [
-    "-DFACTER_RUBY=${ruby}/lib/libruby.so"
+    "-DFACTER_RUBY=${ruby}/lib/libruby${stdenv.hostPlatform.extensions.sharedLibrary}"
     "-DRUBY_LIB_INSTALL=${placeholder "out"}/lib/ruby"
   ];
 
-  NIX_CFLAGS_COMPILE = "-Wno-error=deprecated-copy";
+  NIX_CFLAGS_COMPILE = "-Wno-error";
 
   nativeBuildInputs = [ cmake ];
   buildInputs = [ boost cpp-hocon curl leatherman libwhereami libyamlcpp openssl ruby utillinux ];
@@ -31,6 +31,6 @@ stdenv.mkDerivation rec {
     description = "A system inventory tool";
     license = licenses.asl20;
     maintainers = [ maintainers.womfoo ];
-    platforms = platforms.linux;
+    platforms = platforms.unix;
   };
 }