Loading nixos/tests/all-tests.nix +1 −0 Original line number Diff line number Diff line Loading @@ -717,6 +717,7 @@ in homepage-dashboard = runTest ./homepage-dashboard.nix; homer = handleTest ./homer { }; honk = runTest ./honk.nix; hoogle = runTest ./hoogle.nix; hostname = handleTest ./hostname.nix { }; hound = runTest ./hound.nix; hub = runTest ./git/hub.nix; Loading nixos/tests/hoogle.nix 0 → 100644 +31 −0 Original line number Diff line number Diff line { lib, ... }: { name = "hoogle"; meta.maintainers = with lib.maintainers; [ h7x4 ]; nodes.machine = { pkgs, ... }: { services.hoogle = { enable = true; packages = hp: with hp; [ arrows lens ]; }; }; testScript = { nodes, ... }: let cfg = nodes.machine.services.hoogle; in '' machine.wait_for_unit("hoogle.service") machine.wait_for_open_port(${toString cfg.port}) machine.succeed("curl http://${cfg.host}:${toString cfg.port} | grep '<title>Hoogle</title>'") machine.succeed("curl 'http://${cfg.host}:${toString cfg.port}?hoogle=>>>' | grep Arrow") ''; } pkgs/development/haskell-modules/hoogle.nix +3 −0 Original line number Diff line number Diff line Loading @@ -9,6 +9,7 @@ haskellPackages, writeText, runCommand, nixosTests, }: # This argument is a function which selects a list of Haskell packages from any Loading Loading @@ -137,6 +138,8 @@ buildPackages.stdenv.mkDerivation (finalAttrs: { ''; }; passthru.tests.nixos = nixosTests.hoogle; meta = { description = "Local Hoogle database"; platforms = ghc.meta.platforms; Loading Loading
nixos/tests/all-tests.nix +1 −0 Original line number Diff line number Diff line Loading @@ -717,6 +717,7 @@ in homepage-dashboard = runTest ./homepage-dashboard.nix; homer = handleTest ./homer { }; honk = runTest ./honk.nix; hoogle = runTest ./hoogle.nix; hostname = handleTest ./hostname.nix { }; hound = runTest ./hound.nix; hub = runTest ./git/hub.nix; Loading
nixos/tests/hoogle.nix 0 → 100644 +31 −0 Original line number Diff line number Diff line { lib, ... }: { name = "hoogle"; meta.maintainers = with lib.maintainers; [ h7x4 ]; nodes.machine = { pkgs, ... }: { services.hoogle = { enable = true; packages = hp: with hp; [ arrows lens ]; }; }; testScript = { nodes, ... }: let cfg = nodes.machine.services.hoogle; in '' machine.wait_for_unit("hoogle.service") machine.wait_for_open_port(${toString cfg.port}) machine.succeed("curl http://${cfg.host}:${toString cfg.port} | grep '<title>Hoogle</title>'") machine.succeed("curl 'http://${cfg.host}:${toString cfg.port}?hoogle=>>>' | grep Arrow") ''; }
pkgs/development/haskell-modules/hoogle.nix +3 −0 Original line number Diff line number Diff line Loading @@ -9,6 +9,7 @@ haskellPackages, writeText, runCommand, nixosTests, }: # This argument is a function which selects a list of Haskell packages from any Loading Loading @@ -137,6 +138,8 @@ buildPackages.stdenv.mkDerivation (finalAttrs: { ''; }; passthru.tests.nixos = nixosTests.hoogle; meta = { description = "Local Hoogle database"; platforms = ghc.meta.platforms; Loading