From 060ccf1e4033fadf229bb7eee644093db8d01227 Mon Sep 17 00:00:00 2001 From: Stefan Frijters Date: Sat, 30 May 2026 20:26:42 +0200 Subject: [PATCH] mplayer: embed version, add versionCheckHook --- pkgs/applications/video/mplayer/default.nix | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/video/mplayer/default.nix b/pkgs/applications/video/mplayer/default.nix index b54747b99a42..ad384520cefe 100644 --- a/pkgs/applications/video/mplayer/default.nix +++ b/pkgs/applications/video/mplayer/default.nix @@ -66,6 +66,7 @@ libjpeg, useUnfreeCodecs ? false, buildPackages, + versionCheckHook, }: assert xineramaSupport -> x11Support; @@ -117,7 +118,7 @@ let in -stdenv.mkDerivation { +stdenv.mkDerivation (finalAttrs: { pname = "mplayer"; version = "1.5-unstable-2024-12-21"; @@ -128,6 +129,7 @@ stdenv.mkDerivation { }; prePatch = '' + echo "${finalAttrs.version}" > VERSION sed -i /^_install_strip/d configure rm -rf ffmpeg @@ -283,6 +285,10 @@ stdenv.mkDerivation { fi ''; + nativeInstallCheckInputs = [ versionCheckHook ]; + versionCheckProgramArg = "--help"; + doInstallCheck = true; + __structuredAttrs = true; meta = { @@ -299,4 +305,4 @@ stdenv.mkDerivation { "aarch64-linux" ]; }; -} +})