Unverified Commit 2bc14b81 authored by Weijia Wang's avatar Weijia Wang Committed by GitHub
Browse files

_4ti2: patch in absolute path to `which` (#504728)

parents e29b5629 24a345ab
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -5,6 +5,7 @@
  autoreconfHook,
  glpk,
  gmp,
  which,
}:

stdenv.mkDerivation (finalAttrs: {
@@ -18,6 +19,12 @@ stdenv.mkDerivation (finalAttrs: {
    hash = "sha256-bFvq90hLLGty7p6NLxOARVvKdizg3bp2NkP9nZpVFzQ=";
  };

  postPatch = ''
    substituteInPlace src/{groebner/script.template.in,zsolve/{graver,hilbert}.template} \
      --replace-fail 'SCRIPT=$(realpath $(which "$0"))' \
                     'SCRIPT=$(realpath $(${lib.getExe which} "$0"))'
  '';

  nativeBuildInputs = [
    autoreconfHook
  ];