From ff51c8717be66826843d6304708fc1f0ff7cd48c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Sun, 29 May 2022 18:17:05 +0200 Subject: Fix cross compilation of Omnia --- flake.lock | 12 ++++----- pkgs/0001-configure.ac-replace-AC_CHECK_FILE.patch | 31 ++++++++++++++++++++++ pkgs/default.nix | 9 +++++++ 3 files changed, 46 insertions(+), 6 deletions(-) create mode 100644 pkgs/0001-configure.ac-replace-AC_CHECK_FILE.patch diff --git a/flake.lock b/flake.lock index 0247827..22512ca 100644 --- a/flake.lock +++ b/flake.lock @@ -2,11 +2,11 @@ "nodes": { "flake-utils": { "locked": { - "lastModified": 1649676176, - "narHash": "sha256-OWKJratjt2RW151VUlJPRALb7OU2S5s+f0vLj4o1bHM=", + "lastModified": 1652776076, + "narHash": "sha256-gzTw/v1vj4dOVbpBSJX4J0DwUR6LIyXo7/SuuTJp1kM=", "owner": "numtide", "repo": "flake-utils", - "rev": "a4b154ebbdc88c8498a5c7b01589addc9e9cb678", + "rev": "04c1b180862888302ddfb2e3ad9eaa63afc60cf8", "type": "github" }, "original": { @@ -16,11 +16,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1651804312, - "narHash": "sha256-DJxOGlxwQccuuwXUS0oRRkcNJbW5UP4fpsL5ga9ZwYw=", + "lastModified": 1653738054, + "narHash": "sha256-IaR8iLN4Ms3f5EjU1CJkXSc49ZzyS5qv03DtVAti6/s=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "d59dd43e49f24b58fe8d5ded38cbdf00c3da4dc2", + "rev": "17b62c338f2a0862a58bb6951556beecd98ccda9", "type": "github" }, "original": { diff --git a/pkgs/0001-configure.ac-replace-AC_CHECK_FILE.patch b/pkgs/0001-configure.ac-replace-AC_CHECK_FILE.patch new file mode 100644 index 0000000..8b377f3 --- /dev/null +++ b/pkgs/0001-configure.ac-replace-AC_CHECK_FILE.patch @@ -0,0 +1,31 @@ +From 4ddfdca8416a008819d08d14d6a6f4796aef7857 Mon Sep 17 00:00:00 2001 +From: Fabrice Fontaine +Date: Mon, 12 Oct 2020 22:40:13 +0200 +Subject: [PATCH] configure.ac: replace AC_CHECK_FILE + +AC_CHECK_FILE can't be used when cross-compiling so replace it by a +simple test -f + +Signed-off-by: Fabrice Fontaine +--- + configure.ac | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 0a19a2a..9773993 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -16,8 +16,8 @@ AC_PROG_CC_STDC + # Check for a2x only if the man page is missing, i.e. we are building from git. The release tarballs + # are set up to include the man pages. This way, only people creating tarballs via `make dist` and + # people building from git need a2x as a dependency. +-AC_CHECK_FILE( +- [src/pixz.1], ++AS_IF( ++ [test -f src/pixz.1], + [], + [ + AC_ARG_WITH( +-- +2.35.1 + diff --git a/pkgs/default.nix b/pkgs/default.nix index ea4112a..849edff 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -38,6 +38,15 @@ let jemalloc = armv7lDisableCheck nixpkgs.jemalloc; openssh = armv7lDisableCheck nixpkgs.openssh; nlohmann_json = armv7lDisableCheck nixpkgs.nlohmann_json; + # Crosscompilation worarounds + btrfs-progs = nixpkgs.btrfs-progs.overrideAttrs (oldAttrs: { + configureFlags = ["--disable-python"]; + installFlags = []; + }); + pixz = nixpkgs.pixz.overrideAttrs (oldAttrs: { + configureFlags = ["--without-manpage"]; + patches = [ ./0001-configure.ac-replace-AC_CHECK_FILE.patch ]; + }); }; -- cgit v1.2.3