From 05491696c54969386968d43771db19ffb36f689a Mon Sep 17 00:00:00 2001 From: Yueh-Shun Li Date: Wed, 13 Mar 2024 23:16:06 +0800 Subject: [PATCH] hello: add postInstallCheck Set doInstallCheck = true. Test the existence of main program in postInstallCheck. --- pkgs/by-name/he/hello/package.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pkgs/by-name/he/hello/package.nix b/pkgs/by-name/he/hello/package.nix index f1b056faf640..68fdcf7e408c 100644 --- a/pkgs/by-name/he/hello/package.nix +++ b/pkgs/by-name/he/hello/package.nix @@ -18,6 +18,13 @@ stdenv.mkDerivation (finalAttrs: { doCheck = true; + doInstallCheck = true; + + # Give hello some install checks for testing purpose. + postInstallCheck = '' + stat "''${!outputBin}/bin/${finalAttrs.meta.mainProgram}" + ''; + passthru.tests = { version = testers.testVersion { package = hello; };