Commit 595e2e95 authored by Pol Dellaiera's avatar Pol Dellaiera
Browse files

glab: enable `versionCheckHook`

parent b3f6d66b
Loading
Loading
Loading
Loading
+15 −5
Original line number Diff line number Diff line
@@ -7,6 +7,7 @@
  stdenv,
  nix-update-script,
  writableTmpDirAsHomeHook,
  versionCheckHook,
  gitMinimal,
}:

@@ -39,7 +40,10 @@ buildGoModule (finalAttrs: {
    ldflags+=" -X main.commit=$(cat COMMIT)"
  '';

  nativeBuildInputs = [ installShellFiles makeBinaryWrapper ];
  nativeBuildInputs = [
    installShellFiles
    makeBinaryWrapper
  ];

  subPackages = [ "cmd/glab" ];

@@ -56,15 +60,21 @@ buildGoModule (finalAttrs: {
      --set-default GLAB_SEND_TELEMETRY 0
  '';

  nativeCheckInputs = [
    gitMinimal
    writableTmpDirAsHomeHook
  ];
  nativeCheckInputs = [ writableTmpDirAsHomeHook ];

  preCheck = ''
    git init
  '';

  doInstallCheck = true;
  nativeInstallCheckInputs = [
    gitMinimal
    versionCheckHook
    writableTmpDirAsHomeHook
  ];
  versionCheckProgramArg = "version";
  versionCheckKeepEnvironment = [ "HOME" ];

  passthru.updateScript = nix-update-script { };

  meta = {