facter: 3.14.17 -> 4.6.1

https://github.com/puppetlabs/facter/compare/3.14.17...4.6.1
This commit is contained in:
Anthony Roussel 2024-03-24 16:44:44 +01:00
parent 51c3cfc68e
commit ea80fbe7c3
No known key found for this signature in database
GPG Key ID: 9DC4987B1A55E75E
4 changed files with 112 additions and 30 deletions

View File

@ -0,0 +1,5 @@
# frozen_string_literal: true
source "https://rubygems.org"
gem "facter"

View File

@ -0,0 +1,17 @@
GEM
remote: https://rubygems.org/
specs:
facter (4.6.1)
hocon (~> 1.3)
thor (>= 1.0.1, < 2.0)
hocon (1.4.0)
thor (1.3.1)
PLATFORMS
ruby
DEPENDENCIES
facter
BUNDLED WITH
2.5.6

View File

@ -1,39 +1,66 @@
{ lib, stdenv, fetchFromGitHub, boost, cmake, cpp-hocon, curl, leatherman, libwhereami, yaml-cpp, openssl, ruby, util-linux }:
{
bundlerApp,
bundlerUpdateScript,
coreutils,
facter,
gnugrep,
iproute2,
lib,
makeWrapper,
nettools,
pciutils,
procps,
stdenv,
testers,
util-linux,
virt-what,
zfs,
}:
stdenv.mkDerivation rec {
bundlerApp {
pname = "facter";
version = "3.14.17";
gemdir = ./.;
exes = [ "facter" ];
src = fetchFromGitHub {
sha256 = "sha256-RvsUt1DyN8Xr+Xtz84mbKlDwxLewgK6qklYVdQHu6q0=";
rev = version;
repo = pname;
owner = "puppetlabs";
nativeBuildInputs = [ makeWrapper ];
postBuild =
let
runtimeDependencies =
[
coreutils
gnugrep
nettools
pciutils
procps
util-linux
]
++ lib.optionals stdenv.isLinux [
iproute2
virt-what
zfs
];
in
''
wrapProgram $out/bin/facter --prefix PATH : ${lib.makeBinPath runtimeDependencies}
'';
passthru = {
tests.version = testers.testVersion {
command = "${lib.getExe facter} --version";
package = facter;
version = (import ./gemset.nix).facter.version;
};
updateScript = bundlerUpdateScript "facter";
};
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";
cmakeFlags = [
"-DFACTER_RUBY=${ruby}/lib/libruby${stdenv.hostPlatform.extensions.sharedLibrary}"
"-DRUBY_LIB_INSTALL=${placeholder "out"}/lib/ruby"
];
env.NIX_CFLAGS_COMPILE = "-Wno-error";
nativeBuildInputs = [ cmake ];
buildInputs = [ boost cpp-hocon curl leatherman libwhereami yaml-cpp openssl ruby util-linux ];
meta = with lib; {
homepage = "https://github.com/puppetlabs/facter";
meta = {
changelog = "https://www.puppet.com/docs/puppet/latest/release_notes_facter.html";
description = "A system inventory tool";
license = licenses.asl20;
maintainers = [ maintainers.womfoo ];
platforms = platforms.unix;
homepage = "https://github.com/puppetlabs/facter";
license = lib.licenses.asl20;
mainProgram = "facter";
maintainers = with lib.maintainers; [ womfoo anthonyroussel ];
platforms = lib.platforms.unix;
};
}

View File

@ -0,0 +1,33 @@
{
facter = {
dependencies = ["hocon" "thor"];
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "0pxpldfcf40dr9khra3sa131ij7gzd97bba2vpw89c785pl736a7";
type = "gem";
};
version = "4.6.1";
};
hocon = {
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "106dmzsl1bxkqw5xaif012nwwfr3k9wff32cqc77ibjngknj6477";
type = "gem";
};
version = "1.4.0";
};
thor = {
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "1vq1fjp45az9hfp6fxljhdrkv75cvbab1jfrwcw738pnsiqk8zps";
type = "gem";
};
version = "1.3.1";
};
}