Skip to content
5 changes: 4 additions & 1 deletion pkgs/by-name/ae/aerospace/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,10 @@ stdenv.mkDerivation {
installShellCompletion --zsh shell-completion/zsh/_aerospace
'';

passthru.tests.can-print-version = [ versionCheckHook ];
doInstallCheck = true;
nativeInstallCheckInputs = [
versionCheckHook
];

passthru.updateScript = gitUpdater {
url = "https://github.com/nikitabobko/AeroSpace.git";
Expand Down
6 changes: 5 additions & 1 deletion pkgs/by-name/as/astroterm/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,17 @@ stdenv.mkDerivation (finalAttrs: {
meson
ninja
xxd
versionCheckHook
];
buildInputs = [
argtable
ncurses
];

doInstallCheck = true;
nativeInstallCheckInputs = [
versionCheckHook
];

postPatch = ''
mkdir -p data
ln -s ${finalAttrs.bsc5File} data/bsc5
Expand Down
1 change: 1 addition & 0 deletions pkgs/by-name/cl/cloudpan189-go/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ buildGo122Module rec {
'';
};

doInstallCheck = true;
nativeInstallCheckInputs = [
versionCheckHook
];
Expand Down
2 changes: 2 additions & 0 deletions pkgs/by-name/de/deepsource/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ buildGoModule rec {
--zsh <($out/bin/deepsource completion zsh)
'';

doInstallCheck = true;
versionCheckProgramArg = [ "version" ];
nativeInstallCheckInputs = [
versionCheckHook
];
Expand Down
9 changes: 8 additions & 1 deletion pkgs/by-name/en/envision-unwrapped/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ stdenv.mkDerivation (finalAttrs: {
pkg-config
rustPlatform.cargoSetupHook
rustc
versionCheckHook
wrapGAppsHook4
];

Expand All @@ -87,6 +86,14 @@ stdenv.mkDerivation (finalAttrs: {
zlib
];

# FIXME: error when running `env -i envision`:
# "HOME env var not defined: NotPresent"
doInstallCheck = false;
Comment on lines 89 to 91
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So this one is not converted over, correct?

Copy link
Member Author

@pbsds pbsds Jan 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

correct, it is no longer a silent no-op, but also it doesn't work due to requiring HOMe

versionCheckProgram = "${placeholder "out"}/bin/envision";
nativeInstallCheckInputs = [
versionCheckHook
];

postInstall = ''
wrapProgram $out/bin/envision \
--prefix PATH : "${lib.makeBinPath [ gdb ]}"
Expand Down
10 changes: 9 additions & 1 deletion pkgs/by-name/go/gollama/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ buildGoModule rec {
hash = "sha256-7wCBflX34prZJl4HhZUU2a2qHxaBs1fMKHpwE0vX1GE=";
};

postPatch = ''
substituteInPlace main.go \
--replace-fail 'Version = "1.28.0"' 'Version = "${version}"'
'';

vendorHash = "sha256-Y5yg54em+vqoWXxS3JVQVPEM+fLXgoblmY+48WpxSCQ=";

doCheck = false;
Expand All @@ -25,7 +30,10 @@ buildGoModule rec {
"-w"
];

nativeInputChecks = [
# FIXME: error when running `env -i gollama`:
# "Error initializing logging: $HOME is not defined"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do these work if you add this?

preInstallCheckPhase = ''
  export HOME=$(mktemp -d)
'';

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not due to env --ignore-environment

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, the -i flag went into the noise but --ignore-environment really says what it does.

doInstallCheck = false;
nativeInstallCheckInputs = [
versionCheckHook
];

Expand Down
4 changes: 4 additions & 0 deletions pkgs/by-name/me/mergiraf/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ rustPlatform.buildRustPackage rec {

nativeCheckInputs = [
git
];

doInstallCheck = true;
nativeInstallCheckInputs = [
versionCheckHook
];

Expand Down
3 changes: 2 additions & 1 deletion pkgs/by-name/ni/nixpkgs-review/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@ python3Packages.buildPythonApplication rec {
done
'';

nativeCheckInputs = [
doInstallCheck = true;
nativeInstallCheckInputs = [
versionCheckHook
];
versionCheckProgramArg = [ "--version" ];
Expand Down
3 changes: 2 additions & 1 deletion pkgs/by-name/nv/nvitop/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ python3Packages.buildPythonApplication rec {
nvidia-ml-py
];

nativeCheckInputs = [
doInstallCheck = true;
nativeInstallCheckInputs = [
versionCheckHook
];
versionCheckProgramArg = [ "--version" ];
Expand Down
8 changes: 4 additions & 4 deletions pkgs/by-name/up/upbound/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ stdenvNoCC.mkDerivation {
installShellCompletion --bash --name up <(echo complete -C up up)
'';

# FIXME: error when running `env -i up`:
# "up: error: $HOME is not defined"
doInstallCheck = false;
versionCheckProgram = "${placeholder "out"}/bin/up";
versionCheckProgramArg = "version";

nativeInstallCheckInputs = [
Expand All @@ -63,10 +67,6 @@ stdenvNoCC.mkDerivation {
"${version-channel}"
];

passthru.tests = {
versionCheck = versionCheckHook;
};

meta = {
description = "CLI for interacting with Upbound Cloud, Upbound Enterprise, and Universal Crossplane (UXP)";
homepage = "https://upbound.io";
Expand Down