planify: 4.11.6 -> 4.12.0 (#379469)
[NixPkgs.git] / pkgs / by-name / fa / facter / package.nix
blob864efc67eac1f912e4957fbc2bf2e3d8680843c7
2   bundlerApp,
3   bundlerUpdateScript,
4   coreutils,
5   facter,
6   gnugrep,
7   iproute2,
8   lib,
9   makeWrapper,
10   nettools,
11   pciutils,
12   procps,
13   stdenv,
14   testers,
15   util-linux,
16   virt-what,
17   zfs,
20 bundlerApp {
21   pname = "facter";
22   gemdir = ./.;
23   exes = [ "facter" ];
25   nativeBuildInputs = [ makeWrapper ];
27   postBuild =
28     let
29       runtimeDependencies =
30         [
31           coreutils
32           gnugrep
33           nettools
34           pciutils
35           procps
36           util-linux
37         ]
38         ++ lib.optionals stdenv.hostPlatform.isLinux [
39           iproute2
40           virt-what
41           zfs
42         ];
43     in
44     ''
45       wrapProgram $out/bin/facter --prefix PATH : ${lib.makeBinPath runtimeDependencies}
46     '';
48   passthru = {
49     tests.version = testers.testVersion {
50       command = "${lib.getExe facter} --version";
51       package = facter;
52       version = (import ./gemset.nix).facter.version;
53     };
54     updateScript = bundlerUpdateScript "facter";
55   };
57   meta = {
58     changelog = "https://www.puppet.com/docs/puppet/latest/release_notes_facter.html";
59     description = "System inventory tool";
60     homepage = "https://github.com/puppetlabs/facter";
61     license = lib.licenses.asl20;
62     mainProgram = "facter";
63     maintainers = with lib.maintainers; [
64       womfoo
65       anthonyroussel
66     ];
67     platforms = lib.platforms.unix;
68   };