Skip to content

Conversation

@alapshin
Copy link
Contributor

@alapshin alapshin commented Jan 6, 2025

Add package for beancount v3
Add package for beangulp as a replacement for beancount.ingest
Update package for beanquery to use snapshot version that using TatSu-LTS dependency: beancount/beanquery#226
Update fava to version 1.30.1 which supports both beancount2 and beancount3.

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 25.05 Release Notes (or backporting 24.11 and 25.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

@github-actions github-actions bot added the 6.topic: python Python is a high-level, general-purpose programming language. label Jan 6, 2025
@alapshin alapshin changed the title Update Beancount to a new major version python312Packages.beancount: 2.3.6 -> 3.0.0 Jan 6, 2025
@nix-owners nix-owners bot requested a review from natsukium January 6, 2025 20:11
@github-actions github-actions bot added 10.rebuild-darwin: 11-100 This PR causes between 11 and 100 packages to rebuild on Darwin. 10.rebuild-linux: 11-100 This PR causes between 11 and 100 packages to rebuild on Linux. 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: documentation This PR adds or changes documentation 8.has: changelog This PR adds or changes release notes labels Jan 6, 2025
@SharzyL
Copy link
Contributor

SharzyL commented Jan 7, 2025

I am not using v3 currently. How is it working with existing tools now?

@alapshin
Copy link
Contributor Author

alapshin commented Jan 7, 2025

I am not using v3 currently. How is it working with existing tools now?

I used v3 for the last 6 months, and it works ok for me. However, I don't use any custom importers based on beancount.ingest which is the main breaking change, and input my expenses by hand. Until recently, Fava didn't support v3, but now it does: beancount/fava#1831

Overall, I think it is in good enough shape for everyday use, but it depends on your setup.

@SharzyL
Copy link
Contributor

SharzyL commented Jan 7, 2025

It would be nice to have v3 in nixpkgs. But since there are major incompatibilities between v2 and v3, and v2 is still widely used, I would like to keep both v2 and v3 in nixpkgs, i.e. beancount and beancount3. Otherwise users may find their tools broken after an upgrade. When v2 is marked as deprecated, we can add warnings in nixpkgs and later replace beancount with beancount3.

@github-actions github-actions bot removed 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: documentation This PR adds or changes documentation 8.has: changelog This PR adds or changes release notes labels Jan 7, 2025
@alapshin
Copy link
Contributor Author

alapshin commented Jan 7, 2025

Ok, makes sense. I reworked PR: added separate package for beancount3 and support for building fava with either version. This way user can specify beancount = beancount3 via overlay and use it everywhere.

@github-actions github-actions bot added 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. and removed 10.rebuild-darwin: 11-100 This PR causes between 11 and 100 packages to rebuild on Darwin. 10.rebuild-linux: 11-100 This PR causes between 11 and 100 packages to rebuild on Linux. labels Jan 7, 2025
@alapshin alapshin changed the title python312Packages.beancount: 2.3.6 -> 3.0.0 python312Packages.beancount3: init at 3.0.0 Jan 7, 2025
@alapshin alapshin force-pushed the beancount3 branch 2 times, most recently from 4faf5eb to 85ca22d Compare January 7, 2025 16:21
Copy link
Member

@dotlambda dotlambda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The commit message needs to be adapted. I suggest

  • python313Packages.beancount: 2.3.6 -> 3.1.0
  • python313Packages.beancount_2: init at 2.3.6

@dotlambda
Copy link
Member

Also updated beanprice 2.0 which require beancount >= 3, but because v3 is default now it works.

It might make sense to set meta.broken = lib.versionOlder beancount.version "3"

@github-actions github-actions bot added 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: changelog This PR adds or changes release notes 8.has: documentation This PR adds or changes documentation labels Feb 21, 2025
@dotlambda dotlambda changed the title python313Packages.beancount3: init at 3.1.0 @alapshin python3Packages.beancount: 2.3.6 -> 3.1.0 Feb 21, 2025
@dotlambda dotlambda changed the title @alapshin python3Packages.beancount: 2.3.6 -> 3.1.0 python3Packages.beancount: 2.3.6 -> 3.1.0 Feb 21, 2025
@alapshin alapshin marked this pull request as ready for review February 21, 2025 18:04
@alapshin
Copy link
Contributor Author

Added comment in beanquery package explaining choice of snapshot version.

@dotlambda
Copy link
Member

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 371541


x86_64-linux

⏩ 1 package blacklisted:
  • nixos-install-tools
✅ 37 packages built:
  • beancount (python312Packages.beancount)
  • beancount.dist (python312Packages.beancount.dist)
  • beancount_2 (python312Packages.beancount_2)
  • beancount_2.dist (python312Packages.beancount_2.dist)
  • beanprice
  • beanprice.dist
  • beanquery (python312Packages.beanquery)
  • beanquery.dist (python312Packages.beanquery.dist)
  • fava
  • fava.dist
  • ledger2beancount
  • python312Packages.beancount-docverif
  • python312Packages.beancount-docverif.dist
  • python312Packages.beancount-plugin-utils
  • python312Packages.beancount-plugin-utils.dist
  • python312Packages.beangulp
  • python312Packages.beangulp.dist
  • python312Packages.petl
  • python312Packages.petl.dist
  • python312Packages.tatsu-lts
  • python312Packages.tatsu-lts.dist
  • python313Packages.beancount
  • python313Packages.beancount-docverif
  • python313Packages.beancount-docverif.dist
  • python313Packages.beancount-plugin-utils
  • python313Packages.beancount-plugin-utils.dist
  • python313Packages.beancount.dist
  • python313Packages.beancount_2
  • python313Packages.beancount_2.dist
  • python313Packages.beangulp
  • python313Packages.beangulp.dist
  • python313Packages.beanquery
  • python313Packages.beanquery.dist
  • python313Packages.petl
  • python313Packages.petl.dist
  • python313Packages.tatsu-lts
  • python313Packages.tatsu-lts.dist

@dotlambda dotlambda merged commit 7dd54f6 into NixOS:master Feb 22, 2025
25 of 27 checks passed
@alapshin
Copy link
Contributor Author

@dotlambda Thanks for your patience and feedback while moving this PR forward.

@alapshin alapshin deleted the beancount3 branch April 17, 2025 19:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

0.kind: packaging request Request for a new package to be added 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 6.topic: python Python is a high-level, general-purpose programming language. 8.has: changelog This PR adds or changes release notes 8.has: documentation This PR adds or changes documentation 10.rebuild-darwin: 11-100 This PR causes between 11 and 100 packages to rebuild on Darwin. 10.rebuild-linux: 11-100 This PR causes between 11 and 100 packages to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants