Something went wrong. Try again.
What happens if I push all of nixpkgs
Something went wrong. Try again.
1.9 kB · 94 lines
Nix
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495{ stdenv, lib, addDriverRunpath, buildPythonPackage, fetchFromGitHub, cmake, cython_0, numpy, six, nose, mako, config, cudaSupport ? config.cudaSupport, cudaPackages ? { }, openclSupport ? true, ocl-icd, clblas,}:
buildPythonPackage rec { pname = "libgpuarray"; version = "0.7.6"; format = "setuptools";
src = fetchFromGitHub { owner = "Theano"; repo = "libgpuarray"; rev = "v${version}"; sha256 = "0ksil18c9ign4xrv5k323flhvdy6wdxh8szdd3nivv31jc3zsdri"; };
# requires a GPU doCheck = false;
configurePhase = "cmakeConfigurePhase";
libraryPath = lib.makeLibraryPath ( lib.optionals cudaSupport ( with cudaPackages; [ cudatoolkit.lib cudatoolkit.out ] ) ++ lib.optionals openclSupport ([ clblas ] ++ lib.optional (!stdenv.isDarwin) ocl-icd) );
preBuild = '' make -j$NIX_BUILD_CORES make install
export NIX_CFLAGS_COMPILE="-L $out/lib -I $out/include $NIX_CFLAGS_COMPILE"
cd .. '';
postFixup = '' rm $out/lib/libgpuarray-static.a '' + lib.optionalString (!stdenv.isDarwin) '' function fixRunPath { p=$(patchelf --print-rpath $1) patchelf --set-rpath "$p:$libraryPath" $1 }
fixRunPath $out/lib/libgpuarray.so '' + lib.optionalString cudaSupport '' addDriverRunpath $out/lib/libgpuarray.so '';
propagatedBuildInputs = [ numpy six mako ];
nativeBuildInputs = [ cmake cython_0 ] ++ lib.optionals cudaSupport [ addDriverRunpath ];
buildInputs = [ nose ];
meta = with lib; { homepage = "https://github.com/Theano/libgpuarray"; description = "Library to manipulate tensors on GPU"; license = licenses.free; maintainers = with maintainers; [ artuuge ]; platforms = platforms.unix; };}