uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead
https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948 this can do it nicely. Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
commit
56de2bcd43
30691 changed files with 3076956 additions and 0 deletions
77
pkgs/os-specific/linux/intel-ocl/default.nix
Normal file
77
pkgs/os-specific/linux/intel-ocl/default.nix
Normal file
|
|
@ -0,0 +1,77 @@
|
|||
{ lib, stdenv, fetchzip, rpmextract, ncurses5, numactl, zlib }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "intel-ocl";
|
||||
version = "5.0-63503";
|
||||
|
||||
src = fetchzip {
|
||||
# https://github.com/NixOS/nixpkgs/issues/166886
|
||||
urls = [
|
||||
"https://registrationcenter-download.intel.com/akdlm/irc_nas/11396/SRB5.0_linux64.zip"
|
||||
"http://registrationcenter-download.intel.com/akdlm/irc_nas/11396/SRB5.0_linux64.zip"
|
||||
];
|
||||
sha256 = "0qbp63l74s0i80ysh9ya8x7r79xkddbbz4378nms9i7a0kprg9p2";
|
||||
stripRoot = false;
|
||||
};
|
||||
|
||||
buildInputs = [ rpmextract ];
|
||||
|
||||
sourceRoot = ".";
|
||||
|
||||
libPath = lib.makeLibraryPath [
|
||||
stdenv.cc.cc.lib
|
||||
ncurses5
|
||||
numactl
|
||||
zlib
|
||||
];
|
||||
|
||||
postUnpack = ''
|
||||
# Extract the RPMs contained within the source ZIP.
|
||||
rpmextract source/intel-opencl-r${version}.x86_64.rpm
|
||||
rpmextract source/intel-opencl-cpu-r${version}.x86_64.rpm
|
||||
'';
|
||||
|
||||
patchPhase = ''
|
||||
runHook prePatch
|
||||
|
||||
# Remove libOpenCL.so, since we use ocl-icd's libOpenCL.so instead and this would cause a clash.
|
||||
rm opt/intel/opencl/libOpenCL.so*
|
||||
|
||||
# Patch shared libraries.
|
||||
for lib in opt/intel/opencl/*.so; do
|
||||
patchelf --set-rpath "${libPath}:$out/lib/intel-ocl" $lib || true
|
||||
done
|
||||
|
||||
runHook postPatch
|
||||
'';
|
||||
|
||||
buildPhase = ''
|
||||
runHook preBuild
|
||||
|
||||
# Create ICD file, which just contains the path of the corresponding shared library.
|
||||
echo "$out/lib/intel-ocl/libintelocl.so" > intel.icd
|
||||
|
||||
runHook postBuild
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
install -D -m 0755 opt/intel/opencl/*.so* -t $out/lib/intel-ocl
|
||||
install -D -m 0644 opt/intel/opencl/*.{o,rtl,bin} -t $out/lib/intel-ocl
|
||||
install -D -m 0644 opt/intel/opencl/{LICENSE,NOTICES} -t $out/share/doc/intel-ocl
|
||||
install -D -m 0644 intel.icd -t $out/etc/OpenCL/vendors
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
dontStrip = true;
|
||||
|
||||
meta = {
|
||||
description = "Official OpenCL runtime for Intel CPUs";
|
||||
homepage = "https://software.intel.com/en-us/articles/opencl-drivers";
|
||||
license = lib.licenses.unfree;
|
||||
platforms = [ "x86_64-linux" ];
|
||||
maintainers = [ lib.maintainers.kierdavis ];
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue