git.iko.soy/typeable/nixpkgs
on master help sign in
mxnet: 1.1.0 -> 1.2.1 (#46026)

Update and fix the build: - Perl is a build-time requirement. - Fix hardcoded /bin/bash invocation.

commit93a594715881e626a61488042a5796d253914f7e authorDaniël de Kok <me@github.danieldk.eu> dateTue 4 Sep 2018, 11:37 (8 years ago) parent6767396
1 file changed+16−10
pkgs/applications/science/math/mxnet/default.nix+16−10
pkgs/applications/science/math/mxnet/default.nix+16−10
@@ -1,5 +1,5 @@
1−{ stdenv, lib, fetchgit, cmake
2−, opencv, gtest, openblas, liblapack
1+{ stdenv, lib, fetchurl, bash, cmake
2+, opencv, gtest, openblas, liblapack, perl
33, cudaSupport ? false, cudatoolkit, nvidia_x11
44, cudnnSupport ? false, cudnn
55}:
@@ -8,16 +8,17 @@ assert cudnnSupport -> cudaSupport;
88
99stdenv.mkDerivation rec {
1010 name = "mxnet-${version}";
11− version = "1.1.0";
12−
13− # Submodules needed
14− src = fetchgit {
15− url = "https://github.com/apache/incubator-mxnet";
16− rev = "refs/tags/${version}";
17− sha256 = "1qgns0c70a1gfyil96h17ms736nwdkp9kv496gvs9pkzqzvr6cpz";
11+ version = "1.2.1";
12+
13+ # Fetching from git does not work at the time (1.2.1) due to an
14+ # incorrect hash in one of the submodules. The provided tarballs
15+ # contain all necessary sources.
16+ src = fetchurl {
17+ url = "https://github.com/apache/incubator-mxnet/releases/download/${version}/apache-mxnet-src-${version}-incubating.tar.gz";
18+ sha256 = "053zbdgs4j8l79ipdz461zc7wyfbfcflmi5bw7lj2q08zm1glnb2";
1819 };
1920
20− nativeBuildInputs = [ cmake ];
21+ nativeBuildInputs = [ cmake perl ];
2122
2223 buildInputs = [ opencv gtest openblas liblapack ]
2324 ++ lib.optionals cudaSupport [ cudatoolkit nvidia_x11 ]
@@ -30,6 +31,11 @@ stdenv.mkDerivation rec {
3031 ] else [ "-DUSE_CUDA=OFF" ])
3132 ++ lib.optional (!cudnnSupport) "-DUSE_CUDNN=OFF";
3233
34+ postPatch = ''
35+ substituteInPlace 3rdparty/mkldnn/tests/CMakeLists.txt \
36+ --replace "/bin/bash" "${bash}/bin/bash"
37+ '';
38+
3339 installPhase = ''
3440 install -Dm755 libmxnet.so $out/lib/libmxnet.so
3541 cp -r ../include $out