diff options
author | Dmitry Kalinkin <dmitry.kalinkin@gmail.com> | 2020-05-14 18:02:50 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-14 18:02:50 -0400 |
commit | 9943fd1a1daa270848299a1069706c7b8ede5bb1 (patch) | |
tree | 2ce896463bff642f54f30388832ded159e586ca5 /nixos/tests | |
parent | efdeb1a0deb0df4f2621b1d9e6fb2e964fce3848 (diff) | |
parent | 8ee4c3698c573e76cdb6617356ef21a3013a18ae (diff) | |
download | nixpkgs-9943fd1a1daa270848299a1069706c7b8ede5bb1.tar nixpkgs-9943fd1a1daa270848299a1069706c7b8ede5bb1.tar.gz nixpkgs-9943fd1a1daa270848299a1069706c7b8ede5bb1.tar.bz2 nixpkgs-9943fd1a1daa270848299a1069706c7b8ede5bb1.tar.lz nixpkgs-9943fd1a1daa270848299a1069706c7b8ede5bb1.tar.xz nixpkgs-9943fd1a1daa270848299a1069706c7b8ede5bb1.tar.zst nixpkgs-9943fd1a1daa270848299a1069706c7b8ede5bb1.zip |
Merge pull request #76653 from alexarice/agda-rework
Agda rework
Diffstat (limited to 'nixos/tests')
-rw-r--r-- | nixos/tests/agda.nix | 41 | ||||
-rw-r--r-- | nixos/tests/all-tests.nix | 1 |
2 files changed, 42 insertions, 0 deletions
diff --git a/nixos/tests/agda.nix b/nixos/tests/agda.nix new file mode 100644 index 00000000000..e158999e57d --- /dev/null +++ b/nixos/tests/agda.nix @@ -0,0 +1,41 @@ +import ./make-test-python.nix ({ pkgs, ... }: + +let + hello-world = pkgs.writeText "hello-world" '' + open import IO + + main = run(putStrLn "Hello World!") + ''; +in +{ + name = "agda"; + meta = with pkgs.stdenv.lib.maintainers; { + maintainers = [ alexarice turion ]; + }; + + machine = { pkgs, ... }: { + environment.systemPackages = [ + (pkgs.agda.withPackages { + pkgs = p: [ p.standard-library ]; + }) + ]; + virtualisation.memorySize = 2000; # Agda uses a lot of memory + }; + + testScript = '' + # Minimal script that typechecks + machine.succeed("touch TestEmpty.agda") + machine.succeed("agda TestEmpty.agda") + + # Minimal script that actually uses the standard library + machine.succeed('echo "import IO" > TestIO.agda') + machine.succeed("agda -l standard-library -i . TestIO.agda") + + # # Hello world + machine.succeed( + "cp ${hello-world} HelloWorld.agda" + ) + machine.succeed("agda -l standard-library -i . -c HelloWorld.agda") + ''; +} +) diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index f3e90f9bfa7..5caf1c958fb 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -23,6 +23,7 @@ in { _3proxy = handleTest ./3proxy.nix {}; acme = handleTest ./acme.nix {}; + agda = handleTest ./agda.nix {}; atd = handleTest ./atd.nix {}; avahi = handleTest ./avahi.nix {}; babeld = handleTest ./babeld.nix {}; |