2021-01-15 22:18:51 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, boost, cmake, cpp-hocon, curl, leatherman, libwhereami, libyamlcpp, openssl, ruby, util-linux }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "facter";
|
2021-05-03 20:48:10 +00:00
|
|
|
version = "3.14.17";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2021-05-03 20:48:10 +00:00
|
|
|
sha256 = "sha256-RvsUt1DyN8Xr+Xtz84mbKlDwxLewgK6qklYVdQHu6q0=";
|
2020-04-24 23:36:52 +00:00
|
|
|
rev = version;
|
|
|
|
repo = pname;
|
|
|
|
owner = "puppetlabs";
|
|
|
|
};
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
CXXFLAGS = lib.optionalString stdenv.cc.isGNU "-fpermissive -Wno-error=catch-value";
|
|
|
|
NIX_LDFLAGS = lib.optionalString stdenv.isLinux "-lblkid";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
cmakeFlags = [
|
2020-07-18 16:06:22 +00:00
|
|
|
"-DFACTER_RUBY=${ruby}/lib/libruby${stdenv.hostPlatform.extensions.sharedLibrary}"
|
2020-04-24 23:36:52 +00:00
|
|
|
"-DRUBY_LIB_INSTALL=${placeholder "out"}/lib/ruby"
|
|
|
|
];
|
|
|
|
|
2020-07-18 16:06:22 +00:00
|
|
|
NIX_CFLAGS_COMPILE = "-Wno-error";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [ cmake ];
|
2020-11-24 20:58:05 +00:00
|
|
|
buildInputs = [ boost cpp-hocon curl leatherman libwhereami libyamlcpp openssl ruby util-linux ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/puppetlabs/facter";
|
|
|
|
description = "A system inventory tool";
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = [ maintainers.womfoo ];
|
2020-07-18 16:06:22 +00:00
|
|
|
platforms = platforms.unix;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|