diff options
author | Philipp Hausmann <ph_git@314.ch> | 2017-11-28 08:26:38 +0100 |
---|---|---|
committer | Orivej Desh <orivej@gmx.fr> | 2017-11-29 14:58:36 +0000 |
commit | 59a737a9220dbd5de9e281744ff83c44ed762377 (patch) | |
tree | 1a8f990ffde4affcac42f5d3ac00565652a60631 /pkgs/servers/monitoring/fusion-inventory | |
parent | 5f59913c74f3b165594cedcaf7dc475407c2ca7d (diff) | |
download | nixpkgs-59a737a9220dbd5de9e281744ff83c44ed762377.tar nixpkgs-59a737a9220dbd5de9e281744ff83c44ed762377.tar.gz nixpkgs-59a737a9220dbd5de9e281744ff83c44ed762377.tar.bz2 nixpkgs-59a737a9220dbd5de9e281744ff83c44ed762377.tar.lz nixpkgs-59a737a9220dbd5de9e281744ff83c44ed762377.tar.xz nixpkgs-59a737a9220dbd5de9e281744ff83c44ed762377.tar.zst nixpkgs-59a737a9220dbd5de9e281744ff83c44ed762377.zip |
FusionInventory: Patch in NixOS support
Adds support for the /etc/os-release file and to read installed software from the Nix store.
Diffstat (limited to 'pkgs/servers/monitoring/fusion-inventory')
-rw-r--r-- | pkgs/servers/monitoring/fusion-inventory/default.nix | 26 |
1 files changed, 21 insertions, 5 deletions
diff --git a/pkgs/servers/monitoring/fusion-inventory/default.nix b/pkgs/servers/monitoring/fusion-inventory/default.nix index b4f5e325675..34b4e87bf65 100644 --- a/pkgs/servers/monitoring/fusion-inventory/default.nix +++ b/pkgs/servers/monitoring/fusion-inventory/default.nix @@ -5,14 +5,30 @@ buildPerlPackage rec { name = "FusionInventory-Agent-${version}"; version = "2.3.21"; - src = fetchurl { - url = "mirror://cpan/authors/id/G/GB/GBOUGARD/${name}.tar.gz"; - sha256 = "0c2ijild03bfw125h2gyaip2mg1jxk72dcanrlx9n6pjh2ay90zh"; + + src = fetchFromGitHub { + owner = "fusioninventory"; + repo = "fusioninventory-agent"; + rev = version; + sha256 = "034clffcn0agx85macjgml4lyhvvck7idn94pqd2c77pk6crvw2y"; }; - patches = [ ./remove_software_test.patch ]; + patches = [ + ./remove_software_test.patch + # support for os-release file + (fetchurl { + url = https://github.com/fusioninventory/fusioninventory-agent/pull/396.diff; + sha256 = "0bxrjmff80ab01n23xggci32ajsah6zvcmz5x4hj6ayy6dzwi6jb"; + }) + # support for Nix software inventory + (fetchurl { + url = https://github.com/fusioninventory/fusioninventory-agent/pull/397.diff; + sha256 = "0pyf7mp0zsb3zcqb6yysr1zfp54p9ciwjn1pzayw6s9flmcgrmbw"; + }) + ]; postPatch = '' + patchShebangs bin substituteInPlace "lib/FusionInventory/Agent/Tools/Linux.pm" \ @@ -61,7 +77,7 @@ buildPerlPackage rec { for cur in $out/bin/*; do if [ -x "$cur" ]; then sed -e "s|./lib|$out/lib|" -i "$cur" - wrapProgram "$cur" --prefix PATH : ${lib.makeBinPath [nix dmidecode pciutils usbutils nettools]} + wrapProgram "$cur" --prefix PATH : ${lib.makeBinPath [nix dmidecode pciutils usbutils nettools iproute]} fi done ''; |