From 3c1a84a07ed3ab54a3372175b9268eaa1887a679 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Tue, 2 Feb 2021 15:29:26 +0800 Subject: [PATCH] Revert "artiq-full: move reading standalone flag from sinara-systems to before generatedNix" hydra-eval-jobs returned exit code 1: error: --- Error --- hydra-eval-jobs worker error: error: --- RestrictedPathError --- hydra-eval-jobs access to path '/nix/store/xq8mnh5rf5v0www2amzvlbf8m6r0ckjv-pm405hs1s21h4p3bq7fg2vcwwc1gqcfv-source/apm.json' is forbidden in restricted mode This reverts commit b0e041c7162dc22aa4006c8b5cdf2bfaee3b291b. --- artiq-full.nix | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) diff --git a/artiq-full.nix b/artiq-full.nix index 5de005c..dcf0f3d 100644 --- a/artiq-full.nix +++ b/artiq-full.nix @@ -2,23 +2,6 @@ let sinaraSystemsSrc = ; - standaloneVariants = - let - jsonFiles = - builtins.attrNames ( - pkgs.lib.filterAttrs (name: type: - type != "directory" && - builtins.match ".+\\.json" name != null - ) (builtins.readDir sinaraSystemsSrc) - ); - isStandalone = jsonFile: - (builtins.fromJSON ( - builtins.readFile "${sinaraSystemsSrc}/${jsonFile}" - )).base == "standalone"; - in - map (builtins.replaceStrings [".json"] [""]) ( - builtins.filter isStandalone jsonFiles - ); generatedNix = pkgs.runCommand "generated-nix" { buildInputs = [ pkgs.nix pkgs.git ]; } '' @@ -128,9 +111,6 @@ let "wipm7master" "wipm7satellite" ]); - standaloneVariants = [${builtins.concatStringsSep " " ( - builtins.map (variant: "\"${variant}\"") standaloneVariants - )}]; # Splitting the build process into software+gateware does # not work when artiq embeds compiled firmware into generated # Vivado input. @@ -168,7 +148,7 @@ let boardBinaries = boardBinaries; inherit target variant; }; - } // (pkgs.lib.optionalAttrs (builtins.elem variant standaloneVariants) { + } // (pkgs.lib.optionalAttrs ((builtins.fromJSON (builtins.readFile json)).base == "standalone") { "device-db-\''${target}-\''${variant}" = pkgs.stdenv.mkDerivation { name = "device-db-\''${target}-\''${variant}"; buildInputs = ddbDeps;