From 82e161dba3240c7ef2676ab6bea9ab78cab2068b Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Wed, 1 Sep 2021 19:59:23 +0800 Subject: [PATCH] hydra: hack-patch allowed URIs to work around Nix issue #5039 --- nixbld-etc-nixos/configuration.nix | 1 + nixbld-etc-nixos/hydra-hack-allowed-uris.patch | 13 +++++++++++++ 2 files changed, 14 insertions(+) create mode 100644 nixbld-etc-nixos/hydra-hack-allowed-uris.patch diff --git a/nixbld-etc-nixos/configuration.nix b/nixbld-etc-nixos/configuration.nix index 4d0d6d28..fbfc0dd3 100644 --- a/nixbld-etc-nixos/configuration.nix +++ b/nixbld-etc-nixos/configuration.nix @@ -468,6 +468,7 @@ in patches = oa.patches or [] ++ [ ./hydra-conda.patch ./hydra-restrictdist.patch + ./hydra-hack-allowed-uris.patch # work around https://github.com/NixOS/nix/issues/5039 ]; hydraPath = oa.hydraPath + ":" + super.lib.makeBinPath [ super.jq ]; }); diff --git a/nixbld-etc-nixos/hydra-hack-allowed-uris.patch b/nixbld-etc-nixos/hydra-hack-allowed-uris.patch new file mode 100644 index 00000000..ed15d921 --- /dev/null +++ b/nixbld-etc-nixos/hydra-hack-allowed-uris.patch @@ -0,0 +1,13 @@ +diff --git a/src/hydra-eval-jobs/hydra-eval-jobs.cc b/src/hydra-eval-jobs/hydra-eval-jobs.cc +index 934bf42e..48f2d248 100644 +--- a/src/hydra-eval-jobs/hydra-eval-jobs.cc ++++ b/src/hydra-eval-jobs/hydra-eval-jobs.cc +@@ -281,6 +281,8 @@ int main(int argc, char * * argv) + to the environment. */ + evalSettings.restrictEval = true; + ++ evalSettings.allowedUris = {"https://github.com/m-labs/misoc.git"}; ++ + /* When building a flake, use pure evaluation (no access to + 'getEnv', 'currentSystem' etc. */ + evalSettings.pureEval = myArgs.flake;