From 4a16f2ec94643dfa24f0ad0737d9bcebcf8fd464 Mon Sep 17 00:00:00 2001 From: sternenseemann <0rpkxez4ksa01gb3typccl0i@systemli.org> Date: Sun, 28 Mar 2021 13:18:38 +0200 Subject: [PATCH] foot: add tests checking the clang compilation to the package I want to support this in the future. Since I sometimes forget to check clang compilation when doing a version bump, there has been regression to this in the past. Let's prevent this by checking compilation with the default clang version in nixpkgs and the latest clang as well. --- .../terminal-emulators/foot/default.nix | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/pkgs/applications/terminal-emulators/foot/default.nix b/pkgs/applications/terminal-emulators/foot/default.nix index 82c5e0076b7d..286572254995 100644 --- a/pkgs/applications/terminal-emulators/foot/default.nix +++ b/pkgs/applications/terminal-emulators/foot/default.nix @@ -18,6 +18,10 @@ , pkg-config , allowPgo ? true , python3 # for PGO +# for clang stdenv check +, foot +, llvmPackages +, llvmPackages_latest }: let @@ -140,6 +144,16 @@ stdenv.mkDerivation rec { llvm-profdata merge default_*profraw --output=default.profdata ''; + passthru.tests = { + clang-default-compilation = foot.override { + inherit (llvmPackages) stdenv; + }; + + clang-latest-compilation = foot.override { + inherit (llvmPackages_latest) stdenv; + }; + }; + meta = with lib; { homepage = "https://codeberg.org/dnkl/foot/"; changelog = "https://codeberg.org/dnkl/foot/releases/tag/${version}";