diff --git a/pkgs/by-name/oc/ocsinventory-agent/package.nix b/pkgs/by-name/oc/ocsinventory-agent/package.nix index d3f77414e049..fc6083282a58 100644 --- a/pkgs/by-name/oc/ocsinventory-agent/package.nix +++ b/pkgs/by-name/oc/ocsinventory-agent/package.nix @@ -2,6 +2,7 @@ , stdenv , perlPackages , fetchFromGitHub +, fetchpatch , makeWrapper , shortenPerlShebang , coreutils @@ -22,21 +23,31 @@ }: perlPackages.buildPerlPackage rec { - version = "2.10.1"; pname = "ocsinventory-agent"; + version = "2.10.4"; src = fetchFromGitHub { owner = "OCSInventory-NG"; repo = "UnixAgent"; - rev = "refs/tags/v${version}-MAC"; - hash = "sha256-aFzBrUsVttUhpYGEYd/yYuXmE90PGCiBmBsVjtHcHLg="; + rev = "refs/tags/v${version}"; + hash = "sha256-MKUYf3k47lHc9dTGo1wYd7r4GrX98dU+04mF0Jm5e9U="; }; + patches = [ + # Fix Getopt-Long warnings + # See https://github.com/OCSInventory-NG/UnixAgent/pull/490 + (fetchpatch { + url = "https://github.com/OCSInventory-NG/UnixAgent/commit/c4899cef6b797df471ddf41c427970de47302f80.patch"; + hash = "sha256-HxcWb9jmHiL0r6VWlsvmKUuybnM9W5471FLBBe3Zrfs="; + }) + ]; + nativeBuildInputs = [ makeWrapper ] ++ lib.optional stdenv.hostPlatform.isDarwin shortenPerlShebang; buildInputs = with perlPackages; [ perl DataUUID + GetoptLong IOCompress IOSocketSSL LWP @@ -81,8 +92,6 @@ perlPackages.buildPerlPackage rec { version = testers.testVersion { package = ocsinventory-agent; command = "ocsinventory-agent --version"; - # upstream has not updated version in lib/Ocsinventory/Agent/Config.pm - version = "2.10.0"; }; }; updateScript = nix-update-script { };