[Nix-dev] nix-build python27Packages.ldap fails

Tinker Thaler tinkerthaler at gmail.com
Tue Jan 20 21:17:33 CET 2015


When I try to build the ldap python package, it fails.

$ nix-build -A python27Packages.ldap
...
gcc: error: unrecognized command line option '-R'

Not sure if anyone else has this?

I wanted to give it a try with a different gcc but I couldn't figure out
how to tell buildPythonPackage to use it.
I read about the overrideGCC.

So what I tried was:

import the function and define an alternative stdenv:

  stdenvAdapters = import ../stdenv/adapters.nix pkgs;
  stdenv_gcc34 = stdenvAdapters.overrideGCC stdenv pkgs.gcc34;

But then how do I inject it into the (existing) buildPythonPackage function?
  ldap = buildPythonPackage rec {
  ...
  buildInputs = [stdenv_gcc34]; #?
  ...
  }

$ nix-shell -A python27Packages.ldap
[nix-shell:/src/nixpkgs]$ source $stdenv/setup
[nix-shell:/src/nixpkgs]$ which gcc
/nix/store/ng41cx2qbqmr81b4cvxvm9qi80kbasv0-gcc-wrapper-4.8.4/bin/gcc
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.science.uu.nl/pipermail/nix-dev/attachments/20150120/aa6c761b/attachment.html 


More information about the nix-dev mailing list