Tests failing for home-manager notmuch and can't disable them

I want to modify a nix package in home manager because I get a failure building notmuch:

 PASS   notmuch-show: remove multiple tags from single message
 PASS   Message with .. in Message-Id:
 PASS   Message with quote in Message-Id:
FATAL: /build/notmuch-0.29.1/test/T310-emacs.sh: interrupted by signal 15

Notmuch test suite complete.
All 535 tests passed.
ERROR: Aborting on T310-emacs (returned 124)
make: *** [test/Makefile.local:75: test] Error 124
builder for '/nix/store/givnsvxzfi1zia2lzgah5srklc1ry6kj-notmuch-0.29.1.drv' failed with exit code 2

Ideally I’d figure out what is wrong with that test, but I wanted to finish testing my IMAP setup first so thought I’d disable the test. I tried with this home.nix:

{ config, pkgs, ... }:

let notmuch = pkgs.notmuch.overrideDerivation(oldAttrs: {
      doCheck = false;
    });
in
{

  accounts.email.accounts = {
    "foo@localhost" = {
      primary = true;
      realName = "foo";
      userName = "foo";
      address = "foo@localhost";
      notmuch.enable = true;
    };
  };
  
  programs = { 
    notmuch = {
      enable = true;
      hooks = {
        preNew = "mbsync --all";
      };
    };
    mbsync.enable = true;
  };
  home-manager = {
    enable = true;
  };
}

I then went and looked at the source code of the notmuch nix expression:

I thought that doCheck was provided for nix expressions automatically, but since it didn’t seem to have any affect above I guess the nix expression has to handle it?

your modifications don’t change the notmuch used by home-manager. Try moving your modification in an overlay so that pkgs.notmuch gets actually updated.

1 Like