Merge pull request #116677 from alexarice/agda-test-hello-world

This commit is contained in:
Doron Behar 2021-04-02 10:19:00 +00:00 committed by GitHub
commit 785d2c03a0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 4 deletions

View File

@ -3,8 +3,9 @@ import ./make-test-python.nix ({ pkgs, ... }:
let let
hello-world = pkgs.writeText "hello-world" '' hello-world = pkgs.writeText "hello-world" ''
open import IO open import IO
open import Level
main = run(putStrLn "Hello World!") main = run {0} (putStrLn "Hello World!")
''; '';
in in
{ {

View File

@ -1,6 +1,6 @@
# Builder for Agda packages. # Builder for Agda packages.
{ stdenv, lib, self, Agda, runCommandNoCC, makeWrapper, writeText, mkShell, ghcWithPackages }: { stdenv, lib, self, Agda, runCommandNoCC, makeWrapper, writeText, mkShell, ghcWithPackages, nixosTests }:
with lib.strings; with lib.strings;
@ -18,7 +18,10 @@ let
in runCommandNoCC "${pname}-${version}" { in runCommandNoCC "${pname}-${version}" {
inherit pname version; inherit pname version;
nativeBuildInputs = [ makeWrapper ]; nativeBuildInputs = [ makeWrapper ];
passthru.unwrapped = Agda; passthru = {
unwrapped = Agda;
tests = { inherit (nixosTests) agda; };
};
} '' } ''
mkdir -p $out/bin mkdir -p $out/bin
makeWrapper ${Agda}/bin/agda $out/bin/agda \ makeWrapper ${Agda}/bin/agda $out/bin/agda \

View File

@ -1,4 +1,4 @@
{ lib, mkDerivation, fetchFromGitHub, ghcWithPackages }: { lib, mkDerivation, fetchFromGitHub, ghcWithPackages, nixosTests }:
mkDerivation rec { mkDerivation rec {
pname = "standard-library"; pname = "standard-library";
@ -19,6 +19,7 @@ mkDerivation rec {
rm EverythingSafe.agda EverythingSafeGuardedness.agda EverythingSafeSizedTypes.agda rm EverythingSafe.agda EverythingSafeGuardedness.agda EverythingSafeSizedTypes.agda
''; '';
passthru.tests = { inherit (nixosTests) agda; };
meta = with lib; { meta = with lib; {
homepage = "https://wiki.portal.chalmers.se/agda/pmwiki.php?n=Libraries.StandardLibrary"; homepage = "https://wiki.portal.chalmers.se/agda/pmwiki.php?n=Libraries.StandardLibrary";
description = "A standard library for use with the Agda compiler"; description = "A standard library for use with the Agda compiler";