anchor.diff:      ./0003-remove-valgrind.patch
     ];
   
  -  preConfigure = ''
  -    export GUILE_AUTO_COMPILE=0 # this needs to be an env variable and not a cmake flag to suppress guile warning
  -  '';
  -
  +  # this needs to be an environment variable and not a cmake flag to suppress
  +  # guile warning
  +  GUILE_AUTO_COMPILE="0";
  +
  +  # `make check` target does not define its prerequisites but expects them to
  +  # have already been built.  The list of targets below was built through trial
  +  # and error based on failing tests.
     doCheck = true;
  -
  -  /*
  -    GNUcash's `make check` target does not define its prerequisites but expects them to have already been built.
  -    The list of targets below was built through trial and error based on failing tests.
  -  */
     preCheck = ''
       make \
         test-account-object \
  
positive.code:   '';
  
    meta = with lib; {
      description = "Personal and small business double entry accounting application.";
      longDescription = ''
        Designed to be easy to use, yet powerful and flexible, GnuCash allows you to track bank accounts, stocks, income and expenses.
        As quick and intuitive to use as a checkbook register, it is based on professional accounting principles to ensure balanced books and accurate reports.
      '';
  
      homepage = "https://www.gnucash.org/";
      license = licenses.gpl2Plus;
      maintainers = [ maintainers.domenkozar ];
      platforms = platforms.linux;
    };
  }
  
negative.code:   pname = "gnucash";
    version = "4.9";
  
    # raw source code doesn't work out of box; fetchFromGitHub not usable
    src = fetchurl {
      url = "https://github.com/Gnucash/gnucash/releases/download/${version}/${pname}-${version}.tar.bz2";
      hash = "sha256-mlUcMMG3EhmfwiJ6EJr7mE177xjhOBcLvHIlxsH6ty0=";
    };
  
    nativeBuildInputs = [
      cmake
      gettext
      makeWrapper
      wrapGAppsHook
    ];
  