Skip to content
This repository was archived by the owner on Apr 12, 2021. It is now read-only.
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs-channels
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: a2aacb218c26
Choose a base ref
...
head repository: NixOS/nixpkgs-channels
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 6f8e07ac0f48
Choose a head ref
  • 7 commits
  • 5 files changed
  • 5 contributors

Commits on Sep 4, 2018

  1. mkDerivation: Fix cross compilation

    Derivations where drawing their `system` attribute from `hostPlatform`
    instead of `buildPlatform`. Fix that, and add an explanatory commment.
    
    Fixes #45993
    Ericson2314 committed Sep 4, 2018
    Copy the full SHA
    06cd7c1 View commit details
  2. Merge pull request #46024 from Ericson2314/fix-45993

    mkDerivation: Fix cross compilation for 18.09
    John Ericson authored Sep 4, 2018
    Copy the full SHA
    46f4a93 View commit details
  3. vowpalwabbit: fix build against boost-python.

    Patch setup.py to look for libboost_python{Major}{Minor}.
    
    (cherry picked from commit 875bb6b)
    danieldk authored and xeji committed Sep 4, 2018
    Copy the full SHA
    8f33594 View commit details
  4. vowpal-wabbit: fix Darwin build.

    - Follow the same logic for finding boost-python as for Linux.
    - Set DYLD_LIBRARY_PATH so that ctypes find_library can find
      boost-python.
    - Do not use '-mt' suffix when linking against boost-serialization
      and boost-program_options on Darwin.
    
    (cherry picked from commit fe7e89b)
    danieldk authored and xeji committed Sep 4, 2018
    Copy the full SHA
    07ec5b5 View commit details
  5. vowpalwabbit: mark broken on aarch64.

    (cherry picked from commit 69d418a)
    danieldk authored and xeji committed Sep 4, 2018
    Copy the full SHA
    b447979 View commit details
  6. mxnet: 1.1.0 -> 1.2.1 (#46026)

    Update and fix the build:
    
    - Perl is a build-time requirement.
    - Fix hardcoded /bin/bash invocation.
    
    (cherry picked from commit 93a5947)
    Daniël de Kok authored and xeji committed Sep 4, 2018
    Copy the full SHA
    4b666f1 View commit details
  7. Merge #46016: openblas: fix pkg-config alias name

    (cherry picked from commit a774988)
    timokau authored and vcunat committed Sep 4, 2018
    Copy the full SHA
    6f8e07a View commit details
26 changes: 16 additions & 10 deletions pkgs/applications/science/math/mxnet/default.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{ stdenv, lib, fetchgit, cmake
, opencv, gtest, openblas, liblapack
{ stdenv, lib, fetchurl, bash, cmake
, opencv, gtest, openblas, liblapack, perl
, cudaSupport ? false, cudatoolkit, nvidia_x11
, cudnnSupport ? false, cudnn
}:
@@ -8,16 +8,17 @@ assert cudnnSupport -> cudaSupport;

stdenv.mkDerivation rec {
name = "mxnet-${version}";
version = "1.1.0";

# Submodules needed
src = fetchgit {
url = "https://github.com/apache/incubator-mxnet";
rev = "refs/tags/${version}";
sha256 = "1qgns0c70a1gfyil96h17ms736nwdkp9kv496gvs9pkzqzvr6cpz";
version = "1.2.1";

# Fetching from git does not work at the time (1.2.1) due to an
# incorrect hash in one of the submodules. The provided tarballs
# contain all necessary sources.
src = fetchurl {
url = "https://github.com/apache/incubator-mxnet/releases/download/${version}/apache-mxnet-src-${version}-incubating.tar.gz";
sha256 = "053zbdgs4j8l79ipdz461zc7wyfbfcflmi5bw7lj2q08zm1glnb2";
};

nativeBuildInputs = [ cmake ];
nativeBuildInputs = [ cmake perl ];

buildInputs = [ opencv gtest openblas liblapack ]
++ lib.optionals cudaSupport [ cudatoolkit nvidia_x11 ]
@@ -30,6 +31,11 @@ stdenv.mkDerivation rec {
] else [ "-DUSE_CUDA=OFF" ])
++ lib.optional (!cudnnSupport) "-DUSE_CUDNN=OFF";

postPatch = ''
substituteInPlace 3rdparty/mkldnn/tests/CMakeLists.txt \
--replace "/bin/bash" "${bash}/bin/bash"
'';

installPhase = ''
install -Dm755 libmxnet.so $out/lib/libmxnet.so
cp -r ../include $out
Original file line number Diff line number Diff line change
@@ -140,7 +140,7 @@ stdenv.mkDerivation rec {
# Write pkgconfig aliases. Upstream report:
# https://github.com/xianyi/OpenBLAS/issues/1740
for alias in blas cblas lapack; do
cat <<EOF > $out/lib/pkgconfig/openblas-$alias.pc
cat <<EOF > $out/lib/pkgconfig/$alias.pc
Name: $alias
Version: ${version}
Description: $alias provided by the OpenBLAS package.
19 changes: 16 additions & 3 deletions pkgs/development/python-modules/vowpalwabbit/default.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{ lib, buildPythonPackage, fetchPypi, python, boost, zlib, clang, ncurses
, pytest, docutils, pygments, numpy, scipy, scikitlearn }:
{ stdenv, lib, buildPythonPackage, fetchPypi, python, boost, zlib, clang
, ncurses, pytest, docutils, pygments, numpy, scipy, scikitlearn }:

buildPythonPackage rec {
pname = "vowpalwabbit";
@@ -9,15 +9,27 @@ buildPythonPackage rec {
inherit pname version;
sha256 = "0b517371fc64f1c728a0af42a31fa93def27306e9b4d25d6e5fd01bcff1b7304";
};

# Should be fixed in next Python release after 8.5.0:
# https://github.com/JohnLangford/vowpal_wabbit/pull/1533
patches = [
./vowpal-wabbit-find-boost.diff
];

# vw tries to write some explicit things to home
# python installed: The directory '/homeless-shelter/.cache/pip/http'
preInstall = ''
export HOME=$PWD
'';

buildInputs = [ boost.dev zlib.dev clang ncurses pytest docutils pygments ];
buildInputs = [ python.pkgs.boost zlib.dev clang ncurses pytest docutils pygments ];
propagatedBuildInputs = [ numpy scipy scikitlearn ];

# Python ctypes.find_library uses DYLD_LIBRARY_PATH.
preConfigure = lib.optionalString stdenv.isDarwin ''
export DYLD_LIBRARY_PATH="${python.pkgs.boost}/lib"
'';

checkPhase = ''
# check-manifest requires a git clone, not a tarball
# check-manifest --ignore "Makefile,PACKAGE.rst,*.cc,tox.ini,tests*,examples*,src*"
@@ -28,6 +40,7 @@ buildPythonPackage rec {
description = "Vowpal Wabbit is a fast machine learning library for online learning, and this is the python wrapper for the project.";
homepage = https://github.com/JohnLangford/vowpal_wabbit;
license = licenses.bsd3;
broken = stdenv.isAarch64;
maintainers = with maintainers; [ teh ];
};
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
--- vowpalwabbit-8.5.0.orig/setup.py 2018-09-03 20:32:39.000000000 +0200
+++ vowpalwabbit-8.5.0/setup.py 2018-09-03 20:34:09.000000000 +0200
@@ -23,18 +23,11 @@

def find_boost():
"""Find correct boost-python library information """
- if system == 'Linux':
+ if system == 'Linux' or system == 'Darwin':
# use version suffix if present
- boost_lib = 'boost_python-py{v[0]}{v[1]}'.format(v=sys.version_info)
- if sys.version_info.major == 3:
- for candidate in ['-py36', '-py35', '-py34', '3']:
- boost_lib = 'boost_python{}'.format(candidate)
- if find_library(boost_lib):
- exit
+ boost_lib = 'boost_python{v[0]}{v[1]}'.format(v=sys.version_info)
if not find_library(boost_lib):
boost_lib = "boost_python"
- elif system == 'Darwin':
- boost_lib = 'boost_python-mt' if sys.version_info[0] == 2 else 'boost_python3-mt'
elif system == 'Cygwin':
boost_lib = 'boost_python-mt' if sys.version_info[0] == 2 else 'boost_python3-mt'
else:
--- vowpalwabbit-8.5.0.orig/src/Makefile 2018-09-03 20:32:40.000000000 +0200
+++ vowpalwabbit-8.5.0/src/Makefile 2018-09-03 21:42:30.000000000 +0200
@@ -37,7 +37,7 @@
NPROCS:=$(shell grep -c ^processor /proc/cpuinfo)
endif
ifeq ($(UNAME), Darwin)
- LIBS = -lboost_program_options-mt -lboost_serialization-mt -l pthread -l z
+ LIBS = -lboost_program_options -lboost_serialization -l pthread -l z
# On Macs, the location isn't always clear
# brew uses /usr/local
# but /opt/local seems to be preferred by some users
10 changes: 9 additions & 1 deletion pkgs/stdenv/generic/make-derivation.nix
Original file line number Diff line number Diff line change
@@ -187,7 +187,15 @@ rec {
builder = attrs.realBuilder or stdenv.shell;
args = attrs.args or ["-e" (attrs.builder or ./default-builder.sh)];
inherit stdenv;
inherit (stdenv.hostPlatform) system;

# The `system` attribute of a derivation has special meaning to Nix.
# Derivations set it to choose what sort of machine could be used to
# execute the build, The build platform entirely determines this,
# indeed more finely than Nix knows or cares about. The `system`
# attribute of `buildPlatfom` matches Nix's degree of specificity.
# exactly.
inherit (stdenv.buildPlatform) system;

userHook = config.stdenv.userHook or null;
__ignoreNulls = true;