From 3ebd239cd5645f679b45f7f843fc4cc67a281ea4 Mon Sep 17 00:00:00 2001 From: Silvan Mosberger Date: Tue, 16 Jan 2024 20:43:03 +0100 Subject: [PATCH] tests.nixpkgs-check-by-name: Test on the current Nixpkgs This test actually fails right now --- pkgs/test/nixpkgs-check-by-name/default.nix | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/pkgs/test/nixpkgs-check-by-name/default.nix b/pkgs/test/nixpkgs-check-by-name/default.nix index c6991820fff2..f2a6473ad202 100644 --- a/pkgs/test/nixpkgs-check-by-name/default.nix +++ b/pkgs/test/nixpkgs-check-by-name/default.nix @@ -6,6 +6,7 @@ clippy, mkShell, makeWrapper, + runCommand, }: let runtimeExprPath = ./src/eval.nix; @@ -52,6 +53,19 @@ let env.NIXPKGS_LIB_PATH = toString nixpkgsLibPath; inputsFrom = [ package ]; }; + + # Tests the tool on the current Nixpkgs tree, this is a good sanity check + passthru.tests.nixpkgs = runCommand "test-nixpkgs-check-by-name" { + nativeBuildInputs = [ + package + nix + ]; + nixpkgsPath = lib.cleanSource ../../..; + } '' + ${initNix} + nixpkgs-check-by-name --base "$nixpkgsPath" "$nixpkgsPath" + touch $out + ''; }; in package