diff --git a/pkgs/by-name/ve/versionCheckHook/hook.sh b/pkgs/by-name/ve/versionCheckHook/hook.sh index cd417493e6c2..88a046b552ee 100644 --- a/pkgs/by-name/ve/versionCheckHook/hook.sh +++ b/pkgs/by-name/ve/versionCheckHook/hook.sh @@ -1,6 +1,12 @@ _handleCmdOutput(){ local versionOutput - versionOutput="$(env --chdir=/ --argv0="$(basename "$1")" --ignore-environment "$@" 2>&1 || true)" + versionOutput="$(env \ + --chdir=/ \ + --argv0="$(basename "$1")" \ + --ignore-environment \ + "$@" 2>&1 \ + | sed -e 's|@storeDir@/[^/ ]*/|{{storeDir}}/|g' \ + || true)" if [[ "$versionOutput" =~ "$version" ]]; then echoPrefix="Successfully managed to" else diff --git a/pkgs/by-name/ve/versionCheckHook/package.nix b/pkgs/by-name/ve/versionCheckHook/package.nix index ed35384d7960..d5039db3f219 100644 --- a/pkgs/by-name/ve/versionCheckHook/package.nix +++ b/pkgs/by-name/ve/versionCheckHook/package.nix @@ -5,6 +5,9 @@ makeSetupHook { name = "version-check-hook"; + substitutions = { + storeDir = builtins.storeDir; + }; meta = { description = "Lookup for $version in the output of --help and --version"; maintainers = with lib.maintainers; [ doronbehar ]; diff --git a/pkgs/development/compilers/c3c/default.nix b/pkgs/development/compilers/c3c/default.nix index 6187b75cc874..7b9b2086b39f 100644 --- a/pkgs/development/compilers/c3c/default.nix +++ b/pkgs/development/compilers/c3c/default.nix @@ -8,7 +8,7 @@ libxml2, libffi, xar, - testers, + versionCheckHook, }: llvmPackages.stdenv.mkDerivation (finalAttrs: { @@ -48,9 +48,8 @@ llvmPackages.stdenv.mkDerivation (finalAttrs: { runHook postCheck ''; - passthru.tests = { - version = testers.testVersion { package = finalAttrs.finalPackage; }; - }; + nativeInstallCheckInputs = [ versionCheckHook ]; + doInstallCheck = true; meta = with lib; { description = "Compiler for the C3 language";