Skip to content

Commit

Permalink
hwinfo: write version info to file
Browse files Browse the repository at this point in the history
This is more robust i.e. when we added another make command
  • Loading branch information
Mic92 committed Sep 3, 2024
1 parent 4d1e8c9 commit 61b0313
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkgs/by-name/hw/hwinfo/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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" \
Expand All @@ -60,7 +62,6 @@ stdenv.mkDerivation (finalAttrs: {

makeFlags = [
"LIBDIR=/lib"
"HWINFO_VERSION=${finalAttrs.version}"
];

installFlags = [ "DESTDIR=$(out)" ];
Expand Down

0 comments on commit 61b0313

Please sign in to comment.