diff options
Diffstat (limited to 'pkgs/by-name/fa/facter')
-rw-r--r-- | pkgs/by-name/fa/facter/Gemfile | 5 | ||||
-rw-r--r-- | pkgs/by-name/fa/facter/Gemfile.lock | 17 | ||||
-rw-r--r-- | pkgs/by-name/fa/facter/gemset.nix | 33 | ||||
-rw-r--r-- | pkgs/by-name/fa/facter/package.nix | 66 |
4 files changed, 121 insertions, 0 deletions
diff --git a/pkgs/by-name/fa/facter/Gemfile b/pkgs/by-name/fa/facter/Gemfile new file mode 100644 index 0000000000000..eff7af10b5d69 --- /dev/null +++ b/pkgs/by-name/fa/facter/Gemfile @@ -0,0 +1,5 @@ +# frozen_string_literal: true + +source "https://rubygems.org" + +gem "facter" diff --git a/pkgs/by-name/fa/facter/Gemfile.lock b/pkgs/by-name/fa/facter/Gemfile.lock new file mode 100644 index 0000000000000..d980285ae0f32 --- /dev/null +++ b/pkgs/by-name/fa/facter/Gemfile.lock @@ -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 diff --git a/pkgs/by-name/fa/facter/gemset.nix b/pkgs/by-name/fa/facter/gemset.nix new file mode 100644 index 0000000000000..6f1cf7a2b8b07 --- /dev/null +++ b/pkgs/by-name/fa/facter/gemset.nix @@ -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"; + }; +} diff --git a/pkgs/by-name/fa/facter/package.nix b/pkgs/by-name/fa/facter/package.nix new file mode 100644 index 0000000000000..38d037c53efb7 --- /dev/null +++ b/pkgs/by-name/fa/facter/package.nix @@ -0,0 +1,66 @@ +{ + bundlerApp, + bundlerUpdateScript, + coreutils, + facter, + gnugrep, + iproute2, + lib, + makeWrapper, + nettools, + pciutils, + procps, + stdenv, + testers, + util-linux, + virt-what, + zfs, +}: + +bundlerApp { + pname = "facter"; + gemdir = ./.; + exes = [ "facter" ]; + + 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"; + }; + + meta = { + changelog = "https://www.puppet.com/docs/puppet/latest/release_notes_facter.html"; + description = "A system inventory tool"; + homepage = "https://github.com/puppetlabs/facter"; + license = lib.licenses.asl20; + mainProgram = "facter"; + maintainers = with lib.maintainers; [ womfoo anthonyroussel ]; + platforms = lib.platforms.unix; + }; +} |