anchor.diff:    ] ++ optionals (!doCheck) [
       "--disable-tests"
       "--disable-gui-tests"
  -  ]
  -  ++ optionals withGui [
  +  ] ++ optionals (!withWallet) [
  +    "--disable-wallet"
  +  ] ++ optionals withGui [
       "--with-gui=qt5"
       "--with-qt-bindir=${qtbase.dev}/bin:${qttools.dev}/bin"
     ];
  
positive.code: , qrencode
  , libevent
  , withGui
  }:
  
  with stdenv.lib;
  
negative.code:   };
  
    nativeBuildInputs =
      [ pkg-config autoreconfHook ]
      ++ optional stdenv.isDarwin hexdump
      ++ optional withGui wrapQtAppsHook;
    buildInputs = [ boost zlib zeromq miniupnpc libevent ]
      ++ optionals stdenv.isLinux [ util-linux ]
      ++ optionals withWallet [ db48 ]
      ++ optionals withGui [ qtbase qttools qrencode ];
  
    postInstall = optional withGui ''
  