ammonite: move nixos test to installCheckPhase

main
Mrinal Purohit 3 years ago
parent 8793bbc759
commit 9e431da515
  1. 1
      nixos/tests/all-tests.nix
  2. 20
      nixos/tests/ammonite.nix
  3. 12
      pkgs/development/tools/ammonite/default.nix

@ -26,7 +26,6 @@ in
agda = handleTest ./agda.nix {};
airsonic = handleTest ./airsonic.nix {};
amazon-init-shell = handleTest ./amazon-init-shell.nix {};
ammonite = handleTest ./ammonite.nix {};
apparmor = handleTest ./apparmor.nix {};
atd = handleTest ./atd.nix {};
atop = handleTest ./atop.nix {};

@ -1,20 +0,0 @@
import ./make-test-python.nix ({ pkgs, ...} : {
name = "ammonite";
meta = with pkgs.lib.maintainers; {
maintainers = [ nequissimus ];
};
nodes = {
amm =
{ pkgs, ... }:
{
environment.systemPackages = [ (pkgs.ammonite.override { jre = pkgs.jre8; }) ];
};
};
testScript = ''
start_all()
amm.succeed("amm -c 'val foo = 21; println(foo * 2)' | grep 42")
'';
})

@ -1,4 +1,4 @@
{ lib, stdenv, fetchurl, jre, nixosTests, writeScript, common-updater-scripts
{ lib, stdenv, fetchurl, jre, writeScript, common-updater-scripts
, git, nixfmt, nix, coreutils, gnused, disableRemoteLogging ? true }:
with lib;
@ -28,7 +28,6 @@ let
'';
passthru = {
tests = { inherit (nixosTests) ammonite; };
updateScript = writeScript "update.sh" ''
#!${stdenv.shell}
@ -58,6 +57,15 @@ let
'';
};
doInstallCheck = true;
installCheckPhase = ''
runHook preInstallCheck
$out/bin/amm -c 'val foo = 21; println(foo * 2)' | grep 42
runHook postInstallCheck
'';
meta = {
description = "Improved Scala REPL";
longDescription = ''

Loading…
Cancel
Save