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
70
pkgs/development/libraries/arrayfire/default.nix
Normal file
70
pkgs/development/libraries/arrayfire/default.nix
Normal file
|
|
@ -0,0 +1,70 @@
|
|||
{ lib, stdenv, fetchFromGitHub, cmake, pkg-config
|
||||
, opencl-clhpp, ocl-icd, fftw, fftwFloat
|
||||
, blas, lapack, boost, mesa, libGLU, libGL
|
||||
, freeimage, python3, clfft, clblas
|
||||
, doxygen, buildDocs ? false
|
||||
, cudaSupport ? false, cudatoolkit
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "arrayfire";
|
||||
version = "3.7.3";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = pname;
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "0gcbg6b6gs38xhks5pp0vkcqs89zl7rh9982jqlzsd0h724qddw0";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
|
||||
cmakeFlags = [
|
||||
"-DAF_BUILD_OPENCL=OFF"
|
||||
"-DAF_BUILD_EXAMPLES=OFF"
|
||||
"-DBUILD_TESTING=OFF"
|
||||
] ++ lib.optional cudaSupport "-DCMAKE_LIBRARY_PATH=${cudatoolkit}/lib/stubs";
|
||||
|
||||
patches = [ ./no-download.patch ];
|
||||
|
||||
postPatch = ''
|
||||
mkdir -p ./build/third_party/clFFT/src
|
||||
cp -R --no-preserve=mode,ownership ${clfft.src}/ ./build/third_party/clFFT/src/clFFT-ext/
|
||||
mkdir -p ./build/third_party/clBLAS/src
|
||||
cp -R --no-preserve=mode,ownership ${clblas.src}/ ./build/third_party/clBLAS/src/clBLAS-ext/
|
||||
mkdir -p ./build/include/CL
|
||||
cp -R --no-preserve=mode,ownership ${opencl-clhpp}/include/CL/cl2.hpp ./build/include/CL/cl2.hpp
|
||||
'';
|
||||
|
||||
preBuild = lib.optionalString cudaSupport ''
|
||||
export CUDA_PATH="${cudatoolkit}"
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
pkg-config
|
||||
python3
|
||||
];
|
||||
|
||||
strictDeps = true;
|
||||
|
||||
buildInputs = [
|
||||
opencl-clhpp fftw fftwFloat
|
||||
blas lapack
|
||||
libGLU libGL
|
||||
mesa freeimage
|
||||
boost.out boost.dev
|
||||
] ++ (lib.optional stdenv.isLinux ocl-icd)
|
||||
++ (lib.optional cudaSupport cudatoolkit)
|
||||
++ (lib.optional buildDocs doxygen);
|
||||
|
||||
meta = with lib; {
|
||||
description = "A general-purpose library for parallel and massively-parallel computations";
|
||||
longDescription = ''
|
||||
A general-purpose library that simplifies the process of developing software that targets parallel and massively-parallel architectures including CPUs, GPUs, and other hardware acceleration devices.";
|
||||
'';
|
||||
license = licenses.bsd3;
|
||||
homepage = "https://arrayfire.com/";
|
||||
platforms = platforms.linux ++ platforms.darwin;
|
||||
maintainers = with maintainers; [ chessai ];
|
||||
};
|
||||
}
|
||||
28
pkgs/development/libraries/arrayfire/no-download.patch
Normal file
28
pkgs/development/libraries/arrayfire/no-download.patch
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
diff --git a/CMakeModules/build_clBLAS.cmake b/CMakeModules/build_clBLAS.cmake
|
||||
index 8de529e8..6361b613 100644
|
||||
--- a/CMakeModules/build_clBLAS.cmake
|
||||
+++ b/CMakeModules/build_clBLAS.cmake
|
||||
@@ -14,8 +14,7 @@ find_package(OpenCL)
|
||||
|
||||
ExternalProject_Add(
|
||||
clBLAS-ext
|
||||
- GIT_REPOSITORY https://github.com/arrayfire/clBLAS.git
|
||||
- GIT_TAG arrayfire-release
|
||||
+ DOWNLOAD_COMMAND true
|
||||
BUILD_BYPRODUCTS ${clBLAS_location}
|
||||
PREFIX "${prefix}"
|
||||
INSTALL_DIR "${prefix}"
|
||||
diff --git a/CMakeModules/build_clFFT.cmake b/CMakeModules/build_clFFT.cmake
|
||||
index 28be38a3..85e3915e 100644
|
||||
--- a/CMakeModules/build_clFFT.cmake
|
||||
+++ b/CMakeModules/build_clFFT.cmake
|
||||
@@ -20,8 +20,7 @@ ENDIF()
|
||||
|
||||
ExternalProject_Add(
|
||||
clFFT-ext
|
||||
- GIT_REPOSITORY https://github.com/arrayfire/clFFT.git
|
||||
- GIT_TAG arrayfire-release
|
||||
+ DOWNLOAD_COMMAND true
|
||||
PREFIX "${prefix}"
|
||||
INSTALL_DIR "${prefix}"
|
||||
UPDATE_COMMAND ""
|
||||
Loading…
Add table
Add a link
Reference in a new issue