Loading pkgs/development/tools/continuous-integration/hercules-ci-agent/default.nix +33 −31 Original line number Diff line number Diff line Loading @@ -35,14 +35,15 @@ in pkg.overrideAttrs (finalAttrs: o: { }; passthru = o.passthru // { tests.help = runCommand "test-hercules-ci-agent-help" { } '' tests = { help = runCommand "test-hercules-ci-agent-help" { } '' (${finalAttrs.finalPackage}/bin/hercules-ci-agent --help 2>&1 || true) | grep -F -- '--config' (${lib.getExe finalAttrs.finalPackage} --help 2>&1 || true) | grep -F -- '--config' touch $out ''; } // lib.optionalAttrs (stdenv.isLinux) { # Does not test the package, but evaluation of the related NixOS module. tests.nixos-simple-config = (nixos { nixos-simple-config = (nixos { boot.loader.grub.enable = false; fileSystems."/".device = "bogus"; services.hercules-ci-agent.enable = true; Loading @@ -50,7 +51,7 @@ in pkg.overrideAttrs (finalAttrs: o: { system.stateVersion = lib.trivial.release; # TEST ONLY }).config.system.build.toplevel; tests.nixos-many-options-config = (nixos ({ pkgs, ... }: { nixos-many-options-config = (nixos ({ pkgs, ... }: { boot.loader.grub.enable = false; fileSystems."/".device = "bogus"; services.hercules-ci-agent = { Loading @@ -69,4 +70,5 @@ in pkg.overrideAttrs (finalAttrs: o: { system.stateVersion = lib.trivial.release; # TEST ONLY })).config.system.build.toplevel; }; }; }) Loading
pkgs/development/tools/continuous-integration/hercules-ci-agent/default.nix +33 −31 Original line number Diff line number Diff line Loading @@ -35,14 +35,15 @@ in pkg.overrideAttrs (finalAttrs: o: { }; passthru = o.passthru // { tests.help = runCommand "test-hercules-ci-agent-help" { } '' tests = { help = runCommand "test-hercules-ci-agent-help" { } '' (${finalAttrs.finalPackage}/bin/hercules-ci-agent --help 2>&1 || true) | grep -F -- '--config' (${lib.getExe finalAttrs.finalPackage} --help 2>&1 || true) | grep -F -- '--config' touch $out ''; } // lib.optionalAttrs (stdenv.isLinux) { # Does not test the package, but evaluation of the related NixOS module. tests.nixos-simple-config = (nixos { nixos-simple-config = (nixos { boot.loader.grub.enable = false; fileSystems."/".device = "bogus"; services.hercules-ci-agent.enable = true; Loading @@ -50,7 +51,7 @@ in pkg.overrideAttrs (finalAttrs: o: { system.stateVersion = lib.trivial.release; # TEST ONLY }).config.system.build.toplevel; tests.nixos-many-options-config = (nixos ({ pkgs, ... }: { nixos-many-options-config = (nixos ({ pkgs, ... }: { boot.loader.grub.enable = false; fileSystems."/".device = "bogus"; services.hercules-ci-agent = { Loading @@ -69,4 +70,5 @@ in pkg.overrideAttrs (finalAttrs: o: { system.stateVersion = lib.trivial.release; # TEST ONLY })).config.system.build.toplevel; }; }; })