Commit 9e853cca authored by qbisi's avatar qbisi Committed by Masum Reza
Browse files

pocl: add installCheckPhase

parent 072302cf
Loading
Loading
Loading
Loading
+16 −0
Original line number Diff line number Diff line
@@ -16,6 +16,7 @@
  python3,
  runCommand,
  makeWrapper,
  writableTmpDirAsHomeHook,
}:

let
@@ -80,6 +81,21 @@ stdenv.mkDerivation (finalAttrs: {

  passthru.updateScript = nix-update-script { };

  nativeInstallCheckInputs = [
    writableTmpDirAsHomeHook
  ];

  doInstallCheck = true;

  installCheckPhase = ''
    runHook preInstallCheck

    export OCL_ICD_VENDORS=$out/etc/OpenCL/vendors
    $out/bin/poclcc -o poclcc.cl.pocl $src/examples/poclcc/poclcc.cl

    runHook postInstallCheck
  '';

  setupHook = ./setup-hook.sh;

  meta = {