conmon: use GIT_COMMIT

This commit is contained in:
Pol Dellaiera
2025-12-01 09:19:12 +01:00
parent 70e9ab7068
commit 19025f89ec
+12 -2
View File
@@ -19,9 +19,20 @@ stdenv.mkDerivation (finalAttrs: {
owner = "containers";
repo = "conmon";
tag = "v${finalAttrs.version}";
hash = "sha256-XsVWcJsUc0Fkn7qGRJDG5xrQAsJr6KN7zMy3AtPuMTo=";
hash = "sha256-/Kt49c8a+R/+Z3KmFLpRTG+BdfPDAOEUtSis3alLAUQ=";
leaveDotGit = true;
postFetch = ''
cd $out
git rev-parse HEAD > COMMIT
rm -rf .git
'';
};
preConfigure = ''
substituteInPlace Makefile \
--replace-fail "(GIT_COMMIT)" "(shell cat COMMIT)"
'';
nativeBuildInputs = [ pkg-config ];
buildInputs = [
glib
@@ -36,7 +47,6 @@ stdenv.mkDerivation (finalAttrs: {
# manpage requires building the vendored go-md2man
makeFlags = [
"bin/conmon"
"VERSION=${finalAttrs.version}"
];
installPhase = ''