lshw: fix built-in version info

Currently lshw says its version is "unknown". Make it report the current
package version instead.
This commit is contained in:
Bjørn Forsman 2017-09-30 11:37:47 +02:00
parent bc265e041a
commit e570198980

View file

@ -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)" ];