aboutsummaryrefslogtreecommitdiff
path: root/nixos
diff options
context:
space:
mode:
authorKarel Kočí <cynerd@email.cz>2022-08-08 08:27:06 +0200
committerKarel Kočí <cynerd@email.cz>2022-08-08 08:27:06 +0200
commit07896ee61dba47bc57c4c3b3b819033dc0324a1b (patch)
tree42ee9d052e6738e7b5dac4a1842f20f72bf4ed96 /nixos
parentdefa8544d9437116a652827db62cbbf1f8933d5e (diff)
downloadnixturris-07896ee61dba47bc57c4c3b3b819033dc0324a1b.tar.gz
nixturris-07896ee61dba47bc57c4c3b3b819033dc0324a1b.tar.bz2
nixturris-07896ee61dba47bc57c4c3b3b819033dc0324a1b.zip
Turris Omnia cross build now should work
Diffstat (limited to 'nixos')
-rw-r--r--nixos/default.nix2
-rw-r--r--nixos/modules/armv7l-overlay.nix86
2 files changed, 88 insertions, 0 deletions
diff --git a/nixos/default.nix b/nixos/default.nix
index 7274f66..080ec0d 100644
--- a/nixos/default.nix
+++ b/nixos/default.nix
@@ -7,6 +7,8 @@ self: let
turris-tarball = import ./modules/turris-tarball.nix;
turris-crossbuild = import ./modules/turris-crossbuild.nix;
+ armv7l-overlay = import ./modules/armv7l-overlay.nix;
+
hostapd = import ./modules/hostapd.nix;
};
diff --git a/nixos/modules/armv7l-overlay.nix b/nixos/modules/armv7l-overlay.nix
new file mode 100644
index 0000000..a1b2449
--- /dev/null
+++ b/nixos/modules/armv7l-overlay.nix
@@ -0,0 +1,86 @@
+{ config, lib, pkgs, ... }:
+
+with lib;
+
+let
+
+ is_native = config.nixpkgs.crossSystem == null && config.nixpkgs.system == "armv7l-linux";
+ is_cross = config.nixpkgs.crossSystem != null && config.nixpkgs.crossSystem.system == "armv7l-linux";
+
+in {
+ nixpkgs.overlays = (optionals is_native [
+ (self: super: let
+
+ disableCheck = pkg: pkg.overrideAttrs (oldAttrs: {
+ doCheck = false;
+ doInstallCheck = false;
+ });
+
+ in {
+
+ boehmgc = disableCheck super.boehmgc;
+ libseccomp = disableCheck super.libseccomp;
+ libuv = disableCheck super.libuv;
+ elfutils = disableCheck super.elfutils;
+ gobject-introspection = disableCheck super.gobject-introspection;
+ nlohmann_json = disableCheck super.nlohmann_json;
+ openldap = disableCheck super.openldap;
+
+
+ python310 = super.python310.override {
+
+ packageOverrides = python-self: python-super: let
+ noTest = pkg: pkg.overrideAttrs (oldAttrs: {
+ dontUsePytestCheck = true;
+ dontUseSetuptoolsCheck = true;
+ });
+ in {
+
+ pytest-xdist = noTest python-super.pytest-xdist;
+ requests = noTest python-super.requests;
+
+ };
+ };
+ python310Packages = self.python310.pkgs;
+ python = self.python310;
+ pythonPackages = self.python.pkgs;
+
+ # Overrides to get build to work
+ #boehmgc = armv7lDisableCheck nixpkgs.boehmgc;
+ #libseccomp = armv7lDisableCheck nixpkgs.libseccomp;
+ #libuv = armv7lDisableCheck nixpkgs.libuv;
+ #elfutils = armv7lDisableCheck nixpkgs.elfutils;
+ #patchelf = armv7lDisableCheck nixpkgs.patchelf;
+ #bison = armv7lDisableCheck nixpkgs.bison;
+ #findutils = armv7lDisableCheck nixpkgs.findutils;
+ #p11-kit = armv7lDisableCheck nixpkgs.p11-kit;
+ #glib = armv7lDisableCheck nixpkgs.glib;
+ #rustc = armv7lDisableCheck nixpkgs.rustc;
+ #mdbook = armv7lDisableCheck nixpkgs.mdbook;
+ #ell = armv7lDisableCheck nixpkgs.ell;
+ #polkit = armv7lDisableCheck nixpkgs.polkit;
+ #udisks2 = disableCheck nixpkgs.udisks2;
+ #udisks = udisks2;
+ #llvm = armv7lDisableCheck nixpkgs.llvm;
+ #llvm_14 = armv7lDisableCheck nixpkgs.llvm_14;
+ #jemalloc = armv7lDisableCheck nixpkgs.jemalloc;
+ #openssh = armv7lDisableCheck nixpkgs.openssh;
+ #nlohmann_json = armv7lDisableCheck nixpkgs.nlohmann_json;
+
+ })
+ ]) ++ (optionals is_cross [
+ (self: super: {
+
+ btrfs-progs = super.btrfs-progs.overrideAttrs (oldAttrs: {
+ configureFlags = ["--disable-python"];
+ installFlags = [];
+ });
+ pixz = super.pixz.overrideAttrs (oldAttrs: {
+ configureFlags = ["--without-manpage"];
+ patches = [ ../../pkgs/patches/0001-configure.ac-replace-AC_CHECK_FILE.patch ];
+ });
+
+ })
+ ]);
+
+}