From 7907d803799bbf712fec4fd7ec55afead06dbeae Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Sun, 8 Aug 2021 23:18:59 +0200 Subject: [PATCH] intel-graphics-compiler: deprecate phases and replace it with runCommandLocal --- .../intel-graphics-compiler/default.nix | 32 ++++++++----------- 1 file changed, 14 insertions(+), 18 deletions(-) diff --git a/pkgs/development/compilers/intel-graphics-compiler/default.nix b/pkgs/development/compilers/intel-graphics-compiler/default.nix index 75687de4e9e2..1c40d7fe516b 100644 --- a/pkgs/development/compilers/intel-graphics-compiler/default.nix +++ b/pkgs/development/compilers/intel-graphics-compiler/default.nix @@ -1,8 +1,8 @@ -{ lib, stdenv +{ lib +, stdenv , fetchFromGitHub , cmake -, pkg-config - +, runCommandLocal , bison , flex , llvmPackages_8 @@ -46,18 +46,14 @@ stdenv.mkDerivation rec { doCheck = false; # Handholding the braindead build script - # We put this in a derivation because the cmake requires an absolute path - prebuilds = stdenv.mkDerivation { - name = "igc-cclang-prebuilds"; - phases = [ "installPhase" ]; - installPhase = '' - mkdir $out - ln -s ${clang}/bin/clang $out/ - ln -s clang $out/clang-${versions.major (getVersion clang)} - ln -s ${opencl-clang}/lib/* $out/ - ln -s ${lib.getLib libclang}/lib/clang/${getVersion clang}/include/opencl-c.h $out/ - ''; - }; + # cmake requires an absolute path + prebuilds = runCommandLocal "igc-cclang-prebuilds" { } '' + mkdir $out + ln -s ${clang}/bin/clang $out/ + ln -s clang $out/clang-${versions.major (getVersion clang)} + ln -s ${opencl-clang}/lib/* $out/ + ln -s ${lib.getLib libclang}/lib/clang/${getVersion clang}/include/opencl-c.h $out/ + ''; cmakeFlags = [ "-DCCLANG_BUILD_PREBUILDS=ON" @@ -66,10 +62,10 @@ stdenv.mkDerivation rec { ]; meta = with lib; { - homepage = "https://github.com/intel/intel-graphics-compiler"; + homepage = "https://github.com/intel/intel-graphics-compiler"; description = "LLVM-based compiler for OpenCL targeting Intel Gen graphics hardware"; - license = licenses.mit; - platforms = platforms.all; + license = licenses.mit; + platforms = platforms.all; maintainers = with maintainers; [ gloaming ]; }; }