[Nix-dev] GCC in pkgs.buildEnv.paths
Eelco Dolstra
eelco.dolstra at logicblox.com
Tue Jun 10 17:09:45 CEST 2014
Hi,
On 21/05/14 21:59, Павел Чуприков wrote:
> Following the
> https://nixos.org/wiki/Howto_keep_multiple_packages_up_to_date_at_once,
> I came up with my ~/.nixpkgs/config.nix file looking like this (for testing
> purposes):
>
> {
> packageOverrides = pkgs : {
> testgcc = pkgs.buildEnv { name = "testgcc"; paths = with pkgs; [ gcc ]; };
Try this lame workaround:
testgcc = pkgs.buildEnv { name = "testgcc"; paths = [ pkgs.pkgs.gcc ]; };
Note the "pkgs.pkgs."
The problem here is that the "pkgs" argument to packageOverrides denotes the
original, *unoverriden* set of packages. That also means that the overrides
applied by stdenv-linux are not included. In particular, these include the
overrides that propagate GCC and Glibc from earlier stdenv bootstrap phases.
(See the use of stdenv.overrides in applyGlobalOverrides in all-packages.nix.)
The workaround is that "pkgs" contains an attribute (also named "pkgs") that
refers to the *final* set of packages. So "pkgs.pkgs.gcc" really means
"pkgsOriginal.pkgsFinal.gcc".
Probably the pkgs argument passed to packageOverrides should include the
overrides from stdenv.
--
Eelco Dolstra | LogicBlox, Inc. | http://nixos.org/~eelco/
More information about the nix-dev
mailing list