From 0e162b97d6a35cd96f10ecda5a1c295e6aeed612 Mon Sep 17 00:00:00 2001 From: Alex Rice Date: Tue, 30 Mar 2021 13:54:02 +0100 Subject: [PATCH] agda nixos test: add to passthru for agda + stdlib --- pkgs/build-support/agda/default.nix | 7 +++++-- .../libraries/agda/standard-library/default.nix | 3 ++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/pkgs/build-support/agda/default.nix b/pkgs/build-support/agda/default.nix index d610a8f9a611..984d61f1f751 100644 --- a/pkgs/build-support/agda/default.nix +++ b/pkgs/build-support/agda/default.nix @@ -1,6 +1,6 @@ # 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; @@ -18,7 +18,10 @@ let in runCommandNoCC "${pname}-${version}" { inherit pname version; nativeBuildInputs = [ makeWrapper ]; - passthru.unwrapped = Agda; + passthru = { + unwrapped = Agda; + tests = { inherit (nixosTests) agda; }; + }; } '' mkdir -p $out/bin makeWrapper ${Agda}/bin/agda $out/bin/agda \ diff --git a/pkgs/development/libraries/agda/standard-library/default.nix b/pkgs/development/libraries/agda/standard-library/default.nix index 4bd5de8bd48d..fd20a0d9a97c 100644 --- a/pkgs/development/libraries/agda/standard-library/default.nix +++ b/pkgs/development/libraries/agda/standard-library/default.nix @@ -1,4 +1,4 @@ -{ lib, mkDerivation, fetchFromGitHub, ghcWithPackages }: +{ lib, mkDerivation, fetchFromGitHub, ghcWithPackages, nixosTests }: mkDerivation rec { pname = "standard-library"; @@ -19,6 +19,7 @@ mkDerivation rec { rm EverythingSafe.agda EverythingSafeGuardedness.agda EverythingSafeSizedTypes.agda ''; + passthru.tests = { inherit (nixosTests) agda; }; meta = with lib; { homepage = "https://wiki.portal.chalmers.se/agda/pmwiki.php?n=Libraries.StandardLibrary"; description = "A standard library for use with the Agda compiler";