tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
pycuda: init at 2016.1
artuuge
9 years ago
be0ade9d
dd5a46f8
+92
3 changed files
expand all
collapse all
unified
split
pkgs
development
python-modules
pycuda
compyte.nix
default.nix
top-level
python-packages.nix
+21
pkgs/development/python-modules/pycuda/compyte.nix
···
1
1
+
{ mkDerivation
2
2
+
, fetchFromGitHub
3
3
+
}:
4
4
+
5
5
+
mkDerivation rec {
6
6
+
name = "compyte-${version}";
7
7
+
version = "git-20150817";
8
8
+
9
9
+
src = fetchFromGitHub {
10
10
+
owner = "inducer";
11
11
+
repo = "compyte";
12
12
+
rev = "ac1c71d46428c14aa1bd1c09d7da19cd0298d5cc";
13
13
+
sha256 = "1980h017qi52b7fqwm75m481xs2napgdd3fbrzkfc29k085cbign";
14
14
+
};
15
15
+
16
16
+
installPhase = ''
17
17
+
mkdir -p $out
18
18
+
cp -r * $out
19
19
+
'';
20
20
+
21
21
+
}
+66
pkgs/development/python-modules/pycuda/default.nix
···
1
1
+
{ buildPythonPackage
2
2
+
, fetchFromGitHub
3
3
+
, boost
4
4
+
, numpy
5
5
+
, pytools
6
6
+
, pytest
7
7
+
, decorator
8
8
+
, appdirs
9
9
+
, six
10
10
+
, cudatoolkit
11
11
+
, python
12
12
+
, mkDerivation
13
13
+
, stdenv
14
14
+
}:
15
15
+
let
16
16
+
compyte = import ./compyte.nix {
17
17
+
inherit mkDerivation fetchFromGitHub;
18
18
+
};
19
19
+
in
20
20
+
buildPythonPackage rec {
21
21
+
name = "pycuda-${version}";
22
22
+
version = "2016.1";
23
23
+
24
24
+
src = fetchFromGitHub {
25
25
+
owner = "inducer";
26
26
+
repo = "pycuda";
27
27
+
rev = "609817e22c038249f5e9ddd720b3ca5a9d58ca11";
28
28
+
sha256 = "0kg6ayxsw2gja9rqspy6z8ihacf9jnxr8hzywjwmj1izkv24cff7";
29
29
+
};
30
30
+
31
31
+
preConfigure = ''
32
32
+
findInputs ${boost} boost_dirs propagated-native-build-inputs
33
33
+
34
34
+
export BOOST_INCLUDEDIR=$(echo $boost_dirs | sed -e s/\ /\\n/g - | grep '\-dev')/include
35
35
+
export BOOST_LIBRARYDIR=$(echo $boost_dirs | sed -e s/\ /\\n/g - | grep -v '\-dev')/lib
36
36
+
37
37
+
${python.interpreter} configure.py --boost-inc-dir=$BOOST_INCLUDEDIR \
38
38
+
--boost-lib-dir=$BOOST_LIBRARYDIR \
39
39
+
--no-use-shipped-boost \
40
40
+
--boost-python-libname=boost_python
41
41
+
'';
42
42
+
43
43
+
postInstall = ''
44
44
+
ln -s ${compyte} $out/${python.sitePackages}/pycuda/compyte
45
45
+
'';
46
46
+
47
47
+
propagatedBuildInputs = [
48
48
+
numpy
49
49
+
pytools
50
50
+
pytest
51
51
+
decorator
52
52
+
appdirs
53
53
+
six
54
54
+
cudatoolkit
55
55
+
compyte
56
56
+
python
57
57
+
];
58
58
+
59
59
+
meta = with stdenv.lib; {
60
60
+
homepage = https://github.com/inducer/pycuda/;
61
61
+
description = "CUDA integration for Python.";
62
62
+
license = licenses.mit;
63
63
+
maintainers = with maintainers; [ artuuge ];
64
64
+
};
65
65
+
66
66
+
}
+5
pkgs/top-level/python-packages.nix
···
7508
7508
};
7509
7509
};
7510
7510
7511
7511
+
pycuda = callPackage ../development/python-modules/pycuda rec {
7512
7512
+
cudatoolkit = pkgs.cudatoolkit75;
7513
7513
+
inherit (pkgs.stdenv) mkDerivation;
7514
7514
+
};
7515
7515
+
7511
7516
python-axolotl = buildPythonPackage rec {
7512
7517
name = "python-axolotl-${version}";
7513
7518
version = "0.1.7";