Commit 19025f89 authored by Pol Dellaiera's avatar Pol Dellaiera
Browse files

conmon: use `GIT_COMMIT`

parent 70e9ab70
Loading
Loading
Loading
Loading
+12 −2
Original line number Diff line number Diff line
@@ -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 = ''