about summary refs log tree commit diff
path: root/nixpkgs/pkgs/tools/system/facter/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/tools/system/facter/default.nix')
-rw-r--r--nixpkgs/pkgs/tools/system/facter/default.nix10
1 files changed, 7 insertions, 3 deletions
diff --git a/nixpkgs/pkgs/tools/system/facter/default.nix b/nixpkgs/pkgs/tools/system/facter/default.nix
index d1d18809a5b5..c6c091c1fba1 100644
--- a/nixpkgs/pkgs/tools/system/facter/default.nix
+++ b/nixpkgs/pkgs/tools/system/facter/default.nix
@@ -1,4 +1,4 @@
-{ lib, stdenv, fetchFromGitHub, boost, cmake, cpp-hocon, curl, leatherman, libwhereami, libyamlcpp, openssl, ruby, util-linux }:
+{ lib, stdenv, fetchFromGitHub, boost, cmake, cpp-hocon, curl, leatherman, libwhereami, yaml-cpp, openssl, ruby, util-linux }:
 
 stdenv.mkDerivation rec {
   pname = "facter";
@@ -11,6 +11,10 @@ stdenv.mkDerivation rec {
     owner = "puppetlabs";
   };
 
+  postPatch = ''
+    sed '1i#include <array>' -i lib/src/facts/glib/load_average_resolver.cc # gcc12
+  '';
+
   CXXFLAGS = lib.optionalString stdenv.cc.isGNU "-fpermissive -Wno-error=catch-value";
   NIX_LDFLAGS = lib.optionalString stdenv.isLinux "-lblkid";
 
@@ -19,10 +23,10 @@ stdenv.mkDerivation rec {
     "-DRUBY_LIB_INSTALL=${placeholder "out"}/lib/ruby"
   ];
 
-  NIX_CFLAGS_COMPILE = "-Wno-error";
+  env.NIX_CFLAGS_COMPILE = "-Wno-error";
 
   nativeBuildInputs = [ cmake ];
-  buildInputs = [ boost cpp-hocon curl leatherman libwhereami libyamlcpp openssl ruby util-linux ];
+  buildInputs = [ boost cpp-hocon curl leatherman libwhereami yaml-cpp openssl ruby util-linux ];
 
   meta = with lib; {
     homepage = "https://github.com/puppetlabs/facter";