Unverified Commit 81e7916b authored by Aleksana's avatar Aleksana Committed by GitHub
Browse files

python3Packages.beanquery: 0.1.0-unstable-2025-01-10 -> 0.2.0, fava: 1.30.1 -> 1.30.5 (#427977)

parents 6b50b498 faebb49b
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
--- a/_build_backend.py
+++ b/_build_backend.py
@@ -87,7 +87,7 @@
 
 def _build_fava() -> None:
     """Run the build steps for Fava."""
-    _compile_frontend()
+    # _compile_frontend()
     _compile_translations()
 
 
+41 −7
Original line number Diff line number Diff line
{
  lib,
  python3Packages,
  fetchPypi,
  buildNpmPackage,
  fetchFromGitHub,
  stdenv,
}:
let
  src = buildNpmPackage (finalAttrs: {
    pname = "fava-frontend";
    version = "1.30.5";

python3Packages.buildPythonApplication rec {
    src = fetchFromGitHub {
      owner = "beancount";
      repo = "fava";
      tag = "v${finalAttrs.version}";
      hash = "sha256-46ze+1sdgXq9Unhu1ec4buXbH3s/PCcfCx+rmYc+fZw=";
    };
    sourceRoot = "${finalAttrs.src.name}/frontend";

    npmDepsHash = "sha256-ImBNqccAd61c9ASzklcooQyh7BYdgJW9DTcQRmFHqho=";
    makeCacheWritable = true;

    preBuild = ''
      chmod -R u+w ..
    '';

    installPhase = ''
      runHook preInstall
      cp -R .. $out
      runHook postInstall
    '';
  });
in
python3Packages.buildPythonApplication {
  pname = "fava";
  version = "1.30.1";
  version = "1.30.5";
  pyproject = true;

  src = fetchPypi {
    inherit pname version;
    hash = "sha256-69Wx9/H7nLDPZP9LOUnDJngY9YTCcr+oQ0E6+xeIWPE=";
  };
  inherit src;

  patches = [ ./dont-compile-frontend.patch ];

  postPatch = ''
    substituteInPlace tests/test_cli.py \
@@ -40,6 +67,12 @@ python3Packages.buildPythonApplication rec {

  nativeCheckInputs = [ python3Packages.pytestCheckHook ];

  # tests/test_cli.py
  __darwinAllowLocalNetworking = true;

  # flaky, fails only on ci
  disabledTestPaths = lib.optionals stdenv.hostPlatform.isDarwin [ "tests/test_core_watcher.py" ];

  env = {
    # Disable some tests when building with beancount2
    SNAPSHOT_IGNORE = lib.versions.major python3Packages.beancount.version == "2";
@@ -57,6 +90,7 @@ python3Packages.buildPythonApplication rec {
    license = lib.licenses.mit;
    maintainers = with lib.maintainers; [
      bhipple
      prince213
      sigmanificient
    ];
  };
+4 −6
Original line number Diff line number Diff line
@@ -9,18 +9,16 @@
  setuptools,
  tatsu-lts,
}:
buildPythonPackage {
buildPythonPackage rec {
  pname = "beanquery";
  version = "0.1.0-unstable-2025-01-10";
  version = "0.2.0";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "beancount";
    repo = "beanquery";
    # Pinned at commit where tatsu dependency replaced with tatsu-lts
    # Later snapsot versions break fava build due to API changes at beanquery/shell.py
    rev = "e77a67996a54eef2e9d77b6352c74a40164e281d";
    hash = "sha256-XYfKAscm55lY4YjIGTQ6RMFnCPWemfszpheGQ9qjMiM=";
    tag = "v${version}";
    hash = "sha256-O7+WCF7s50G14oNTvJAOTvgSoNR9fWcn/m1jv7RHmK8=";
  };

  build-system = [ setuptools ];