anchor.diff:      "-Dudev_hwdb_dir=${placeholder "out"}/lib/udev/hwdb.d"
     ];
   
  -  doCheck = true;
  +  installCheckInputs = [
  +    (python3.withPackages (p: with p; [ pygobject3 ]))
  +  ];
   
  -  postPatch = ''
  -    patchShebangs \
  -      tests/test-runner.sh \
  -      tests/unittest_inspector.py \
  -      tests/virtual-image.py \
  -      tests/umockdev-test.py \
  -      tests/test-generated-hwdb.sh
  +  # We need to run tests _after_ install so all the paths that get loaded are in
  +  # the right place.
  +  doCheck = false;
  +
  +  doInstallCheck = true;
  +
  +  installCheckPhase = ''
  +    runHook preInstallCheck
  +
  +    ninjaCheckPhase
  +
  +    runHook postInstallCheck
     '';
   
     meta = with lib; {
  
positive.code:     owner = "libfprint";
      repo = pname;
      rev = "v${version}";
      sha256 = "sha256-C8vBjk0cZm/GSqc6mgNbXG8FycnWRaXhj9wIrLcWzfE=";
    };
  
    nativeBuildInputs = [
      pkg-config
  
negative.code:     libgudev
    ];
  
    mesonFlags = [
      "-Dudev_rules_dir=${placeholder "out"}/lib/udev/rules.d"
      # Include virtual drivers for fprintd tests
  