summaryrefslogtreecommitdiffstats
path: root/res/cross-build-2.nix
diff options
context:
space:
mode:
Diffstat (limited to 'res/cross-build-2.nix')
-rw-r--r--res/cross-build-2.nix46
1 files changed, 46 insertions, 0 deletions
diff --git a/res/cross-build-2.nix b/res/cross-build-2.nix
new file mode 100644
index 0000000..7225964
--- /dev/null
+++ b/res/cross-build-2.nix
@@ -0,0 +1,46 @@
1# This one is much better than the first
2#
3# TODO: get `nix build -f cross-build-2.nix vm` to work
4
5{ nixos ? import <unstable/nixos>, ... }:
6
7let
8 # https://github.com/NixOS/nixpkgs/blob/master/lib/systems/examples.nix
9 target = "armv7l-unknown-linux-gnueabihf";
10
11 configuration = { lib, ... }:
12 {
13 nixpkgs.crossSystem = lib.systems.elaborate { config = target; };
14 nixpkgs.overlays = with lib; singleton (const (super: {
15 polkit = super.polkit.override { withGnome = false; };
16
17 # pkcs11 needs opensc which depends on libXt? which fails to build and is X library
18 rng-tools = super.rng-tools.override { withPkcs11 = false; };
19
20 nix = super.nix.override { withAWS = false; };
21
22 gobject-introspection = super.callPackage /tmp/gobject-introspection.nix { inherit (darwin) cctools; };
23 }));
24
25
26 environment.noXlibs = true;
27 documentation.enable = false;
28
29 # btrfs-progs fails to build
30 services.udisks2.enable = false;
31
32 fonts.fontconfig.enable = false;
33
34 fileSystems."/".fsType = "tmpfs";
35
36 boot = {
37 loader.grub.enable = false;
38 enableContainers = false;
39 hardwareScan = false;
40 };
41
42 powerManagement.enable = false;
43 };
44
45in
46 nixos { inherit configuration; }