diff options
author | Nikolay Amiantov <ab@fmap.me> | 2017-09-17 18:00:28 +0300 |
---|---|---|
committer | Nikolay Amiantov <ab@fmap.me> | 2017-10-19 12:47:30 +0300 |
commit | 50a223b1446224d4fb0144ecd13c2a2d9955a156 (patch) | |
tree | 6f9c00194a6bf8783e20ba61d037af7eeeb402fd /pkgs/development/libraries/science/math/clblas | |
parent | 57f82de364d9f80914cfc63cbdfd8d3f731004b8 (diff) | |
download | nixpkgs-50a223b1446224d4fb0144ecd13c2a2d9955a156.tar nixpkgs-50a223b1446224d4fb0144ecd13c2a2d9955a156.tar.gz nixpkgs-50a223b1446224d4fb0144ecd13c2a2d9955a156.tar.bz2 nixpkgs-50a223b1446224d4fb0144ecd13c2a2d9955a156.tar.lz nixpkgs-50a223b1446224d4fb0144ecd13c2a2d9955a156.tar.xz nixpkgs-50a223b1446224d4fb0144ecd13c2a2d9955a156.tar.zst nixpkgs-50a223b1446224d4fb0144ecd13c2a2d9955a156.zip |
clblas: 20160505 -> 2.12
Diffstat (limited to 'pkgs/development/libraries/science/math/clblas')
-rw-r--r-- | pkgs/development/libraries/science/math/clblas/cuda/default.nix | 73 | ||||
-rw-r--r-- | pkgs/development/libraries/science/math/clblas/default.nix | 62 | ||||
-rw-r--r-- | pkgs/development/libraries/science/math/clblas/platform.patch (renamed from pkgs/development/libraries/science/math/clblas/cuda/platform.patch) | 0 |
3 files changed, 62 insertions, 73 deletions
diff --git a/pkgs/development/libraries/science/math/clblas/cuda/default.nix b/pkgs/development/libraries/science/math/clblas/cuda/default.nix deleted file mode 100644 index ae568bc6db1..00000000000 --- a/pkgs/development/libraries/science/math/clblas/cuda/default.nix +++ /dev/null @@ -1,73 +0,0 @@ -{ stdenv -, fetchFromGitHub -, cmake -, gfortran -, blas -, boost -, python -, ocl-icd -, cudatoolkit -, nvidia_x11 -, gtest -}: - -stdenv.mkDerivation rec { - name = "clblas-cuda-${version}"; - version = "git-20160505"; - - src = fetchFromGitHub { - owner = "clMathLibraries"; - repo = "clBLAS"; - rev = "d20977ec4389c6b3751e318779410007c5e272f8"; - sha256 = "1jna176cxznv7iz43svd6cjrbbf0fc2lrbpfpg4s08vc7xnwp0n4"; - }; - - patches = [ ./platform.patch ]; - - postPatch = '' - sed -i -re 's/(set\(\s*Boost_USE_STATIC_LIBS\s+).*/\1OFF\ \)/g' src/CMakeLists.txt - ''; - - configurePhase = '' - findInputs ${boost.dev} boost_dirs propagated-native-build-inputs - - export BOOST_INCLUDEDIR=$(echo $boost_dirs | sed -e s/\ /\\n/g - | grep '\-dev')/include - export BOOST_LIBRARYDIR=$(echo $boost_dirs | sed -e s/\ /\\n/g - | grep -v '\-dev')/lib - - mkdir -p Build - pushd Build - - export LD_LIBRARY_PATH="${stdenv.lib.makeLibraryPath [ blas nvidia_x11 ]}" - - cmake ../src -DCMAKE_INSTALL_PREFIX=$out \ - -DCMAKE_BUILD_TYPE=Release \ - -DOPENCL_ROOT=${cudatoolkit} \ - -DUSE_SYSTEM_GTEST=ON - ''; - - dontStrip = true; - - buildInputs = [ - cmake - gfortran - blas - python - ocl-icd - cudatoolkit - nvidia_x11 - gtest - ]; - - meta = with stdenv.lib; { - homepage = https://github.com/clMathLibraries/clBLAS; - description = "A software library containing BLAS functions written in OpenCL"; - longDescription = '' - This package contains a library of BLAS functions on top of OpenCL. - The current version is linked to the NVIDIA OpenCL implementation provided by the CUDA toolkit. - ''; - license = licenses.asl20; - maintainers = with maintainers; [ artuuge ]; - platforms = platforms.linux; - }; - -} diff --git a/pkgs/development/libraries/science/math/clblas/default.nix b/pkgs/development/libraries/science/math/clblas/default.nix new file mode 100644 index 00000000000..40b02d30341 --- /dev/null +++ b/pkgs/development/libraries/science/math/clblas/default.nix @@ -0,0 +1,62 @@ +{ stdenv +, fetchFromGitHub +, cmake +, gfortran +, blas +, boost +, python +, ocl-icd +, opencl-headers +, gtest +}: + +stdenv.mkDerivation rec { + name = "clblas-${version}"; + version = "2.12"; + + src = fetchFromGitHub { + owner = "clMathLibraries"; + repo = "clBLAS"; + rev = "v${version}"; + sha256 = "154mz52r5hm0jrp5fqrirzzbki14c1jkacj75flplnykbl36ibjs"; + }; + + patches = [ ./platform.patch ]; + + postPatch = '' + sed -i -re 's/(set\(\s*Boost_USE_STATIC_LIBS\s+).*/\1OFF\ \)/g' src/CMakeLists.txt + ''; + + preConfigure = '' + cd src + ''; + + cmakeFlags = [ + "-DUSE_SYSTEM_GTEST=ON" + ]; + + buildInputs = [ + cmake + gfortran + blas + python + ocl-icd + opencl-headers + boost + gtest + ]; + + enableParallelBuilding = true; + + meta = with stdenv.lib; { + homepage = "https://github.com/clMathLibraries/clBLAS"; + description = "A software library containing BLAS functions written in OpenCL"; + longDescription = '' + This package contains a library of BLAS functions on top of OpenCL. + ''; + license = licenses.asl20; + maintainers = with maintainers; [ artuuge ]; + platforms = platforms.linux; + }; + +} diff --git a/pkgs/development/libraries/science/math/clblas/cuda/platform.patch b/pkgs/development/libraries/science/math/clblas/platform.patch index 87404a426a4..87404a426a4 100644 --- a/pkgs/development/libraries/science/math/clblas/cuda/platform.patch +++ b/pkgs/development/libraries/science/math/clblas/platform.patch |