Skip to content
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
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: cdc714fe4a0f
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 68c73b977fb6
Choose a head ref
  • 2 commits
  • 2 files changed
  • 1 contributor

Commits on Mar 13, 2019

  1. pythonPackages.pybind11: apply patch to properly get headers directories

    It seems as the `pybind11` build code returns the Python headers
    directory (where the `pybind11` headers are stored as well on traditional
    setups) rather than returning the dedicated prefix[1].
    
    An exemplary fallout is the broken build of `pyopencl`[2].
    
    [1] pybind/pybind11#1425
    [2] #56082
    
    (cherry picked from commit 94c3ac2)
    Ma27 authored and Robert Schütz committed Mar 13, 2019
    Copy the full SHA
    2d8b128 View commit details
  2. python3Packages.pyopencl: fix build

    Fix the recently broken build by adding `pybind11`
    to the build. Also set $HOME to a temporary directory during the build
    to avoid "Permission denied" errors in the build script.
    
    This also unbreaks `sasview` and `pybitmessage`.
    
    See also #56826
    See also https://hydra.nixos.org/build/89037506
    
    (cherry picked from commit d237919)
    Ma27 authored and Robert Schütz committed Mar 13, 2019
    Copy the full SHA
    68c73b9 View commit details
Showing with 14 additions and 2 deletions.
  1. +8 −1 pkgs/development/python-modules/pybind11/default.nix
  2. +6 −1 pkgs/development/python-modules/pyopencl/default.nix
9 changes: 8 additions & 1 deletion pkgs/development/python-modules/pybind11/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ lib, buildPythonPackage, fetchPypi }:
{ lib, buildPythonPackage, fetchPypi, fetchpatch }:

buildPythonPackage rec {
pname = "pybind11";
@@ -9,6 +9,13 @@ buildPythonPackage rec {
sha256 = "1kz1z2cg3q901q9spkdhksmcfiskaghzmbb9ivr5mva856yvnak4";
};

patches = [
(fetchpatch {
url = https://github.com/pybind/pybind11/commit/44a40dd61e5178985cfb1150cf05e6bfcec73042.patch;
sha256 = "047nzyfsihswdva96hwchnp4gj2mlbiqvmkdnhxrfi9sji8x31ka";
})
];

# Current PyPi version does not include test suite
doCheck = false;

7 changes: 6 additions & 1 deletion pkgs/development/python-modules/pyopencl/default.nix
Original file line number Diff line number Diff line change
@@ -11,14 +11,15 @@
, six
, opencl-headers
, ocl-icd
, pybind11
}:

buildPythonPackage rec {
pname = "pyopencl";
version = "2018.2.3";

checkInputs = [ pytest ];
buildInputs = [ opencl-headers ocl-icd ];
buildInputs = [ opencl-headers ocl-icd pybind11 ];

propagatedBuildInputs = [ numpy cffi pytools decorator appdirs six Mako ];

@@ -32,6 +33,10 @@ buildPythonPackage rec {
substituteInPlace setup.py --replace "pytest>=2" ""
'';

preBuild = ''
export HOME=$(mktemp -d)
'';

# gcc: error: pygpu_language_opencl.cpp: No such file or directory
doCheck = false;