From e5701989807e18922b92119a7646a28a51175088 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Forsman?= Date: Sat, 30 Sep 2017 11:37:47 +0200 Subject: [PATCH] lshw: fix built-in version info Currently lshw says its version is "unknown". Make it report the current package version instead. --- pkgs/tools/system/lshw/default.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkgs/tools/system/lshw/default.nix b/pkgs/tools/system/lshw/default.nix index dc5b75b0f4a2..a26237bc045b 100644 --- a/pkgs/tools/system/lshw/default.nix +++ b/pkgs/tools/system/lshw/default.nix @@ -19,6 +19,12 @@ stdenv.mkDerivation rec { sha256 = "147wyr5m185f8swsmb4q1ahs9r1rycapbpa2548aqbv298bbish3"; })]; + # Fix version info. + preConfigure = '' + sed -e "s/return \"unknown\"/return \"${version}\"/" \ + -i src/core/version.cc + ''; + buildInputs = lib.optionals withGUI [ gtk2 pkgconfig sqlite ]; makeFlags = [ "PREFIX=$(out)" ];