From ac1269f8002e7546305044809612111759f70c9a Mon Sep 17 00:00:00 2001 From: Alex Tunstall Date: Fri, 19 Apr 2024 20:56:17 +0100 Subject: [PATCH] Run a Hydra server The test suites for gbenchmark, hypothesis, libopus, sh, and tornado time out. httplib2's test suite indirectly depends on selenium, which doesn't build on RISC-V. https://github.com/SeleniumHQ/selenium/pull/13194 The other disabled test suites fail for various cryptic reasons. --- modules/services/default.nix | 35 +++++++++++++++++++++++++++++++++++ overlays/riscv-fixes.nix | 24 ++++++++++++++++++++++++ 2 files changed, 59 insertions(+) diff --git a/modules/services/default.nix b/modules/services/default.nix index b77947c..189ae41 100644 --- a/modules/services/default.nix +++ b/modules/services/default.nix @@ -2,8 +2,43 @@ { services.getty.autologinUser = "root"; + services.hydra = { + enable = true; + hydraURL = "https://hydra.riscv.tunstall.xyz/"; + notificationSender = "unused@example.com"; + extraConfig = '' + # NixOS Hydra bans IFD therefore so shall we + allow_import_from_derivation = false + + # Limit the evaluator memory usage a bit + evaluator_workers = 1 + evaluator_max_memory_size = 1024 + max_concurrent_evals = 1 + ''; + }; + + services.nginx = { + enable = true; + recommendedGzipSettings = true; + recommendedOptimisation = true; + recommendedProxySettings = true; + recommendedTlsSettings = true; + + virtualHosts."hydra.riscv.tunstall.xyz" = { + enableACME = true; + forceSSL = true; + + locations."/".proxyPass = "http://localhost:3000/"; + }; + }; + services.openssh = { enable = true; settings.PermitRootLogin = "yes"; }; + + security.acme = { + acceptTerms = true; + defaults.email = "hostmaster@tunstall.xyz"; + }; } diff --git a/overlays/riscv-fixes.nix b/overlays/riscv-fixes.nix index 1f2605f..335c772 100644 --- a/overlays/riscv-fixes.nix +++ b/overlays/riscv-fixes.nix @@ -16,6 +16,17 @@ in { NIX_CFLAGS_COMPILE = "${NIX_CFLAGS_COMPILE} -Wno-error=cast-align"; }); + folly = super.folly.overrideAttrs ({ meta ? {}, ... }: { + meta = meta // { + platforms = (meta.platforms or []) ++ [ "riscv64-linux" ]; + }; + }); + + gbenchmark = dontCheck super.gbenchmark; + + # The default gn does not recognise RISC-V + gn = self.gn1924; + haskell = super.haskell // { packages = super.haskell.packages // { ghc964 = super.haskell.packages.ghc964.override { @@ -28,6 +39,7 @@ in { }; libbsd = dontCheck super.libbsd; + libopus = dontCheck super.libopus; libuv = dontCheck super.libuv; # Fails in ./configure when LuaJIT isn't available @@ -38,12 +50,24 @@ in { ''; }); + perlPackages = super.perlPackages.overrideScope (plSelf: plSuper: { + Test2Harness = dontCheck plSuper.Test2Harness; + UUID4Tiny = dontCheck plSuper.UUID4Tiny; + }); + pixman = dontCheck super.pixman; protobuf = dontCheck super.protobuf; pythonPackagesExtensions = super.pythonPackagesExtensions ++ [ (pySelf: pySuper: { + executing = pyDontCheck pySuper.executing; + httplib2 = pyDontCheck pySuper.httplib2; + hypothesis = pyDontCheck pySuper.hypothesis; + numpy = pyDontCheck pySuper.numpy; + paramiko = pyDontCheck pySuper.paramiko; + sh = pyDontCheck pySuper.sh; sphinx = pyDontCheck pySuper.sphinx; + tornado = pyDontCheck pySuper.tornado; }) ]; }