about summary refs log tree commit diff
diff options
context:
space:
mode:
authorBjørn Forsman <bjorn.forsman@gmail.com>2017-09-30 11:37:47 +0200
committerBjørn Forsman <bjorn.forsman@gmail.com>2017-09-30 11:39:30 +0200
commite5701989807e18922b92119a7646a28a51175088 (patch)
tree8dbee3286a3c8a57970431c45ff508503747c5da
parentbc265e041a0a640724cae2e15c9637595e6eceef (diff)
downloadnixlib-e5701989807e18922b92119a7646a28a51175088.tar
nixlib-e5701989807e18922b92119a7646a28a51175088.tar.gz
nixlib-e5701989807e18922b92119a7646a28a51175088.tar.bz2
nixlib-e5701989807e18922b92119a7646a28a51175088.tar.lz
nixlib-e5701989807e18922b92119a7646a28a51175088.tar.xz
nixlib-e5701989807e18922b92119a7646a28a51175088.tar.zst
nixlib-e5701989807e18922b92119a7646a28a51175088.zip
lshw: fix built-in version info
Currently lshw says its version is "unknown". Make it report the current
package version instead.
-rw-r--r--pkgs/tools/system/lshw/default.nix6
1 files changed, 6 insertions, 0 deletions
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)" ];