From 4cc75b7cc5782c0a0ba90d4a5453b4aa2c893e94 Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Sat, 26 Oct 2019 10:31:45 +0200 Subject: [PATCH 1/3] ci.nix: Enable darwin build --- nix/ci.nix | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/nix/ci.nix b/nix/ci.nix index ed61e2e..0d37467 100644 --- a/nix/ci.nix +++ b/nix/ci.nix @@ -24,15 +24,16 @@ dimension "Nixpkgs version" { dimension "System" { "x86_64-linux" = { isReferenceTarget = isReferenceNixpkgs; }; - # TODO: darwin - # "x86_64-darwin" = { enableNixOSTests = false; }; + "x86_64-darwin" = { enableNixOSTests = false; }; } ( - system: { isReferenceTarget ? false }: + system: { isReferenceTarget ? false, enableNixOSTests ? true }: let pkgs = import ./. { inherit system; nixpkgsSrc = sources.${nixpkgsSource}; }; in { - inherit (pkgs) arion tests; + inherit (pkgs) arion; + } // lib.optionalAttrs enableNixOSTests { + inherit (pkgs) tests; } // lib.optionalAttrs enableDoc { inherit (pkgs) doc doc-options doc-options-check; } // lib.optionalAttrs isReferenceTarget { From dda66e104e6478859ef675b6891b933b92831f86 Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Sat, 26 Oct 2019 15:37:24 +0200 Subject: [PATCH 2/3] Fix test --- src/haskell/test/Arion/NixSpec.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/haskell/test/Arion/NixSpec.hs b/src/haskell/test/Arion/NixSpec.hs index f5c3887..e20bebf 100644 --- a/src/haskell/test/Arion/NixSpec.hs +++ b/src/haskell/test/Arion/NixSpec.hs @@ -18,7 +18,7 @@ spec = describe "evaluateComposition" $ it "matches an example" $ do { evalUid = 123 , evalModules = NEL.fromList ["src/haskell/testdata/Arion/NixSpec/arion-compose.nix"] - , evalPkgs = "import {}" + , evalPkgs = "import { system = \"x86_64-linux\"; }" , evalWorkDir = Nothing , evalMode = ReadOnly , evalUserArgs = ["--show-trace"] From c38c374fa62607800084542d31f00b422e00fd64 Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Sun, 27 Oct 2019 11:42:40 +0100 Subject: [PATCH 3/3] Work around Nix enforcing cross-system fetch bug https://github.com/hercules-ci/hercules-ci-agent/issues/168 --- docs/options.nix | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/docs/options.nix b/docs/options.nix index 3d3c484..b4c2a8f 100644 --- a/docs/options.nix +++ b/docs/options.nix @@ -8,8 +8,11 @@ let options = eval.options; }; -in pkgs.writeText "agent-options" '' +in (pkgs.writeText "agent-options" '' = Arion options ${options.optionsAsciiDoc} -'' +'').overrideAttrs (o: { + # Work around https://github.com/hercules-ci/hercules-ci-agent/issues/168 + allowSubstitutes = true; +})