pkgs/overlays/unstable: pass crossSystem only when needed
that is, only when buildPlatform and hostPlatform are not identical, fixes difference and build failure of stdenv, when using through overlay certain odd packages like `androidStudioPackages.canary`
This commit is contained in:
parent
56b213c17d
commit
a26bb74da1
1 changed files with 6 additions and 2 deletions
|
@ -28,7 +28,7 @@ let
|
||||||
# localSystem -> pkgs.stdenv.buildPlatform
|
# localSystem -> pkgs.stdenv.buildPlatform
|
||||||
localSystem = nixpkgs.stdenv.buildPlatform;
|
localSystem = nixpkgs.stdenv.buildPlatform;
|
||||||
# crossSystem -> pkgs.stdenv.hostPlatform or pkgs.stdenv.targetPlatform ??
|
# crossSystem -> pkgs.stdenv.hostPlatform or pkgs.stdenv.targetPlatform ??
|
||||||
crossSystem = nixpkgs.stdenv.hostPlatform;
|
# passing below
|
||||||
# config -> pkgs.config
|
# config -> pkgs.config
|
||||||
config = nixpkgs.config;
|
config = nixpkgs.config;
|
||||||
# overlays -> partial of pkgs.overlays
|
# overlays -> partial of pkgs.overlays
|
||||||
|
@ -36,7 +36,11 @@ let
|
||||||
# crossOverlays -> partial of pkgs.overlays
|
# crossOverlays -> partial of pkgs.overlays
|
||||||
# crossOverlays are merged to overlays, not sure what issues that might raise.
|
# crossOverlays are merged to overlays, not sure what issues that might raise.
|
||||||
# ignoring.
|
# ignoring.
|
||||||
};
|
} // (if nixpkgs.stdenv.buildPlatform == nixpkgs.stdenv.hostPlatform then {} else {
|
||||||
|
# workaround for some odd structured packages that changes behaviour
|
||||||
|
# when crossSystem is passed.
|
||||||
|
crossSystem = nixpkgs.stdenv.hostPlatform;
|
||||||
|
});
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
unstable = if useUnstable then unstablePkgsForNixpkgs self else self;
|
unstable = if useUnstable then unstablePkgsForNixpkgs self else self;
|
||||||
|
|
Loading…
Reference in a new issue