Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cross-compiled NixOS #36187

Merged
merged 36 commits into from
Mar 2, 2018
Merged
Changes from 1 commit
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
085bfce
utillinux: Fix cross-compiling when building with systemd
shlevy Feb 27, 2018
a1e219e
bind: Fix cross-compilation
shlevy Feb 27, 2018
a5bb01b
libaio: Add generic cross-compilation patch
shlevy Feb 27, 2018
1f27013
boost: Fix cross-compilation
shlevy Feb 27, 2018
0221112
iputils: Fix cross compile
shlevy Feb 27, 2018
5815c7d
sudo: Fix cross compilation
shlevy Feb 27, 2018
d61a22f
strace: Fix cross-compilation
shlevy Feb 28, 2018
a929301
nixos: kexec: Disable on non-keexecable systems.
shlevy Feb 28, 2018
c0e814a
nixos: udev: Generate hwdb with build-native udevadm.
shlevy Feb 28, 2018
ed5bd8a
fuse: Fix cross-compilation
shlevy Feb 28, 2018
aebb024
nixos: Take glibcLocales from buildPackages.
shlevy Feb 28, 2018
b28cb72
nixos: stage-1: Don't try to test binaries when cross-compiling.
shlevy Feb 28, 2018
cc81202
nixos: initrd-kmod-blacklist-ubuntu: Fix cross-compilation.
shlevy Feb 28, 2018
6a32291
makeModulesClosure: Fix cross-compilation
shlevy Feb 28, 2018
8e65205
nixos: keymap: Fix cross-compilation.
shlevy Feb 28, 2018
306d5cd
perlPackages: Add cross-compilation support.
shlevy Feb 28, 2018
dd6c926
perlPackages.DBI: Stub out dbd_postamble for cross-compilation.
shlevy Feb 28, 2018
b0d6c67
perlPackages.JSON: Fix cross-compilation.
shlevy Feb 28, 2018
fe406d6
nixos: sudo: Use build-time visudo for syntax check.
shlevy Feb 28, 2018
e51a76c
make-dbus-conf: Fix cross-compilation.
shlevy Feb 28, 2018
942855c
tzdata: Fix cross-compilation
shlevy Feb 28, 2018
4d5be58
Merge remote-tracking branch 'origin/master' into cross-nixos
shlevy Feb 28, 2018
f66da15
Merge branch 'staging' into cross-nixos
shlevy Mar 1, 2018
c54730d
gobjectIntrospection: Enable building without X11 support.
shlevy Mar 1, 2018
bcb1bb5
groff: Fix cross-compilation
shlevy Mar 1, 2018
20072d7
nixos: manual: Fix cross-compilation.
shlevy Mar 1, 2018
897b7c7
nixos: Fix initrd dependency detection when cross-compiling.
shlevy Mar 1, 2018
948e290
stage-2-init: Use the host bash as SHELL
shlevy Mar 1, 2018
e70f61f
Add top-level aliases for the runtime shell and its package.
shlevy Mar 1, 2018
fec5434
nixos: Move uses of stdenv.shell to runtimeShell.
shlevy Mar 1, 2018
c3bba10
dhcpcd: Fix cross-compilation.
shlevy Mar 1, 2018
a486cb1
systemd: Fix references to /usr/bin in cross-compilation
shlevy Mar 1, 2018
95579af
Merge remote-tracking branch 'origin/staging' into cross-nixos
shlevy Mar 1, 2018
3448794
nixos: Add nixpkgs.crossSystem option for cross-compilation
shlevy Mar 1, 2018
600b08c
dhcpcd: Add TODO to cleanup after patchShebangs fix
shlevy Mar 1, 2018
60c8c02
bind: Remove unnecessary environment defines.
shlevy Mar 1, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion nixos/modules/misc/nixpkgs.nix
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ in
inherit (config.nixpkgs) config overlays system;
}
'';
default = import ../../.. { inherit (cfg) config overlays system; };
default = import ../../.. { inherit (cfg) config overlays system crossSystem; };
type = pkgsType;
example = literalExample ''import <nixpkgs> {}'';
description = ''
Expand Down Expand Up @@ -130,6 +130,18 @@ in
'';
};

crossSystem = mkOption {
type = types.nullOr types.attrs;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't let me forget about this when I return to #34444

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we have a similar value for localSystem? O:).

Copy link
Member

@Ericson2314 Ericson2314 Mar 1, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes if system before is new in 18.03, it should be changed to local system instead. And the description of that config should in that case take into account crossSystem: "for which NixOS should be built" isn't generally true, should be "on which".

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd be happy to do this in a follow-up PR though.

default = null;
description = ''
The description of the system we're cross-compiling to, or null
if this isn't a cross-compile. See the description of the
crossSystem argument in the nixpkgs manual.
Ignored when <code>nixpkgs.pkgs</code> is set.
'';
};

system = mkOption {
type = types.str;
example = "i686-linux";
Expand Down