Branch: refs/heads/stdenv-updates
Home: https://github.com/NixOS/nixpkgs
Commit: 3227c1d215ce1897bb72ab72333fa1bdd0cd1154
https://github.com/NixOS/nixpkgs/commit/3227c1d215ce1897bb72ab72333fa1bdd0cd1154
Author: Bjørn Forsman <[email protected]>
Date: 2013-12-10 (Tue, 10 Dec 2013)
Changed paths:
M pkgs/development/libraries/ncurses/5_4.nix
M pkgs/development/libraries/ncurses/default.nix
Log Message:
-----------
ncurses: fix includedir setting
${out} in configureFlags isn't expanded, so ncursesw5-config ends up
expanding ${out} at *runtime*. Here is the relevant ncursesw5-config
snippet showing how includedir gets its value at runtime.
bindir="${exec_prefix}/bin"
includedir="${out}/include"
libdir="${exec_prefix}/lib"
datadir="${prefix}/share"
mandir="${prefix}/man"
When running in a plain shell you get this:
$ ncursesw5-config --cflags
-I/include/ncursesw -I/include
And when run in a nix-build shell for e.g. gpsd:
$ ncursesw5-config --cflags
-I/nix/store/HASH-gpsd-3.10/include/ncursesw
-I/nix/store/HASH-gpsd-3.10/include
This is clearly wrong.
Q: How come this has gone undetected for years?
A: It seems few packages use ncursesw5-config to get the compiler
flags. For example, our python curses module builds its own compiler
flags.
Fix this by moving the --includedir setting to preConfigure where shell
variables are expanded.
_______________________________________________
nix-commits mailing list
[email protected]
http://lists.science.uu.nl/mailman/listinfo/nix-commits