From b51bea50371cc7a98863fb64bf1aaa1126a68a36 Mon Sep 17 00:00:00 2001 From: Andrea Ciceri Date: Fri, 15 Jul 2022 01:09:50 +0200 Subject: [PATCH] Jobsets for cross building emacsen (#231) * Jobsets for cross building emacsen * hydra: bump to nixos-22.05 --- hydra/default.nix | 12 ++++++++++++ hydra/emacsen-cross.nix | 25 +++++++++++++++++++++++++ 2 files changed, 37 insertions(+) create mode 100644 hydra/emacsen-cross.nix diff --git a/hydra/default.nix b/hydra/default.nix index 977e8b0c0..97d015f8e 100644 --- a/hydra/default.nix +++ b/hydra/default.nix @@ -46,6 +46,18 @@ let descriptionNote = "emacs"; }; + unstable-cross = mkJobset { + nixpkgsRelease = "nixos-unstable"; + nixFile = "emacsen-cross.nix"; + descriptionNote = "emacs cross builds"; + }; + + stable-cross = mkJobset { + nixpkgsRelease = "nixos-22.05"; + nixFile = "emacsen-cross.nix"; + descriptionNote = "emacs cross builds"; + }; + unstable-pkgs = mkJobset { nixpkgsRelease = "nixos-unstable"; nixFile = "packages.nix"; diff --git a/hydra/emacsen-cross.nix b/hydra/emacsen-cross.nix new file mode 100644 index 000000000..a3be23ab2 --- /dev/null +++ b/hydra/emacsen-cross.nix @@ -0,0 +1,25 @@ +{ nixpkgs }: +let + crossTargets = [ "aarch64-multiplatform" ]; + pkgs = import nixpkgs { + overlays = [ + (import ../default.nix) + ]; + }; + inherit (pkgs) lib; +in +lib.fold lib.recursiveUpdate { } + (builtins.map + (target: + let + targetPkgs = pkgs.pkgsCross.${target}; + in + lib.mapAttrs' (name: job: lib.nameValuePair "${name}-${target}" job) + ({ + inherit (targetPkgs) emacsUnstable emacsUnstable-nox; + inherit (targetPkgs) emacsGit emacsGit-nox; + inherit (targetPkgs) emacsPgtk; + } // lib.optionalAttrs (lib.hasAttr "libgccjit" targetPkgs) { + inherit (targetPkgs) emacsNativeComp emacsGitNativeComp emacsPgtkNativeComp; + })) + crossTargets)