Merge remote-tracking branch 'origin/master' into hardened-stdenv

This commit is contained in:
Franz Pletz
2016-07-09 13:11:02 +02:00
1223 changed files with 107104 additions and 33914 deletions

View File

@@ -0,0 +1,23 @@
{ stdenv, fetchurl, zlib }:
stdenv.mkDerivation rec {
name = "${pname}-${version}";
pname = "htslib";
version = "1.3.1";
src = fetchurl {
url = "https://github.com/samtools/${pname}/releases/download/${version}/${name}.tar.bz2";
sha256 = "49d53a2395b8cef7d1d11270a09de888df8ba06f70fe68282e8235ee04124ae6";
};
buildInputs = [ zlib ];
meta = with stdenv.lib; {
description = "A C library for reading/writing high-throughput sequencing data";
license = licenses.mit;
homepage = http://www.htslib.org/;
platforms = platforms.unix;
maintainers = [ maintainers.mimadrid ];
};
}

View File

@@ -0,0 +1,68 @@
{ stdenv
, fetchFromGitHub
, cmake
, gfortran
, blas
, boost
, python
, cudatoolkit
, nvidia_x11
}:
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} 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="${blas}/lib:${nvidia_x11}/lib"
cmake ../src -DCMAKE_INSTALL_PREFIX=$out \
-DCMAKE_BUILD_TYPE=Release \
-DOPENCL_ROOT=${cudatoolkit} \
'';
dontStrip = true;
buildInputs = [
cmake
gfortran
blas
python
cudatoolkit
nvidia_x11
];
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;
};
}

View File

@@ -0,0 +1,34 @@
diff --git a/src/library/tools/ktest/config.cpp b/src/library/tools/ktest/config.cpp
index 8b20128..faf9bde 100644
--- a/src/library/tools/ktest/config.cpp
+++ b/src/library/tools/ktest/config.cpp
@@ -24,8 +24,6 @@
using namespace clMath;
-static const char DEFAULT_PLATFORM_NAME[] = "AMD Accelerated Parallel Processing";
-
Config::Config() :
defaultConfig_(""),
cpp_("ktest.cpp"),
@@ -35,7 +33,10 @@ Config::Config() :
hasFuncID_(false), hasSubdims_(false),
skipAccuracy_(false)
{
- setPlatform(DEFAULT_PLATFORM_NAME);
+ platform_ = NULL;
+ setPlatform("");
+
+ device_ = NULL;
setDevice("");
memset(&kargs_, 0, sizeof(kargs_));
@@ -262,7 +263,7 @@ Config::setPlatform(const std::string& name)
continue;
}
if (name.empty()) {
- found = (strcmp(pname, DEFAULT_PLATFORM_NAME) == 0);
+ found = true;
}
else {
found = (strcmp(pname, name.c_str()) == 0);

View File

@@ -0,0 +1,46 @@
{ stdenv
, requireFile
, cudatoolkit
}:
stdenv.mkDerivation rec {
version = "5.0";
cudatoolkit_version = "7.5";
name = "cudatoolkit-${cudatoolkit_version}-cudnn-${version}";
src = requireFile rec {
name = "cudnn-${cudatoolkit_version}-linux-x64-v${version}-ga.tgz";
message = ''
This nix expression requires that ${name} is already part of the store.
Register yourself to NVIDIA Accelerated Computing Developer Program, retrieve the cuDNN library
at https://developer.nvidia.com/cudnn, and run the following command in the download directory:
nix-prefetch-url file://${name}
'';
sha256 = "c4739a00608c3b66a004a74fc8e721848f9112c5cb15f730c1be4964b3a23b3a";
};
phases = "unpackPhase installPhase fixupPhase";
installPhase = ''
function fixRunPath {
p=$(patchelf --print-rpath $1)
patchelf --set-rpath "$p:${stdenv.lib.makeLibraryPath [ stdenv.cc.cc ]}" $1
}
fixRunPath lib64/libcudnn.so
mkdir -p $out
cp -a include $out/include
cp -a lib64 $out/lib64
'';
propagatedBuildInputs = [
cudatoolkit
];
meta = {
description = "NVIDIA CUDA Deep Neural Network library (cuDNN)";
homepage = "https://developer.nvidia.com/cudnn";
license = stdenv.lib.licenses.unfree;
};
}