crun: use commit ID
This commit is contained in:
@@ -49,6 +49,12 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
tag = finalAttrs.version;
|
||||
hash = "sha256-WBAwyDODMrUDlgonRbxaNQ+aN8K6YicY2JVArXDJem8=";
|
||||
fetchSubmodules = true;
|
||||
leaveDotGit = true;
|
||||
postFetch = ''
|
||||
cd $out
|
||||
git rev-parse HEAD > COMMIT
|
||||
rm -rf .git
|
||||
'';
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
@@ -77,10 +83,10 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
# config.h with the correct values
|
||||
postPatch = ''
|
||||
echo ${finalAttrs.version} > .tarball-version
|
||||
echo '#define GIT_VERSION "${finalAttrs.src.tag}"' > git-version.h
|
||||
echo "#define GIT_VERSION \"$(cat COMMIT)\"" > git-version.h
|
||||
|
||||
${lib.concatMapStringsSep "\n" (
|
||||
e: "substituteInPlace Makefile.am --replace 'tests/${e}' ''"
|
||||
e: "substituteInPlace Makefile.am --replace-fail 'tests/${e}' ''"
|
||||
) disabledTests}
|
||||
'';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user