From 0f1e7eedbef40957ec627e0acb72da29527cdfc1 Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Thu, 9 Jan 2025 11:56:48 +0100 Subject: [PATCH] uutils-coreutils: add versionCheckHook --- pkgs/by-name/uu/uutils-coreutils/package.nix | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/pkgs/by-name/uu/uutils-coreutils/package.nix b/pkgs/by-name/uu/uutils-coreutils/package.nix index 31bfa78779ae..302ea994e8aa 100644 --- a/pkgs/by-name/uu/uutils-coreutils/package.nix +++ b/pkgs/by-name/uu/uutils-coreutils/package.nix @@ -5,6 +5,8 @@ rustPlatform, cargo, python3Packages, + versionCheckHook, + prefix ? "uutils-", buildMulticallBinary ? true, }: @@ -44,6 +46,17 @@ stdenv.mkDerivation rec { # too many impure/platform-dependent tests doCheck = false; + nativeInstallCheckInputs = [ + versionCheckHook + ]; + versionCheckProgram = + let + prefix' = lib.optionalString (prefix != null) prefix; + in + "${placeholder "out"}/bin/${prefix'}ls"; + versionCheckProgramArg = [ "--version" ]; + doInstallCheck = true; + meta = { description = "Cross-platform Rust rewrite of the GNU coreutils"; longDescription = ''