hwinfo: write version info to file

This is more robust i.e. when we added another make command
This commit is contained in:
Jörg Thalheim 2024-09-03 11:59:08 +02:00
parent 4d1e8c93a6
commit 61b0313191

View File

@ -39,6 +39,8 @@ stdenv.mkDerivation (finalAttrs: {
];
postPatch = ''
# used by the build system
echo ${finalAttrs.version} > VERSION
# Replace /usr paths with Nix store paths
substituteInPlace Makefile \
--replace-fail "/sbin" "/bin" \
@ -60,7 +62,6 @@ stdenv.mkDerivation (finalAttrs: {
makeFlags = [
"LIBDIR=/lib"
"HWINFO_VERSION=${finalAttrs.version}"
];
installFlags = [ "DESTDIR=$(out)" ];