Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
buildPythonPackage,
buildNpmPackage,
fetchFromGitHub,
stdenv,
fava,
hatch-vcs,
hatchling,
Expand Down Expand Up @@ -71,16 +70,10 @@ buildPythonPackage {

pythonImportsCheck = [ "fava_portfolio_returns" ];

# Stay in the root of the repository, so that relative paths to example files
# loaded by tests stay correct.
# Remove `src` to avoid `PYTHONPATH` issues related to `pytestCheckHook` ([1])
# Use importlib import mode to avoid `PYTHONPATH` issues related to `pytestCheckHook` ([1])
# [1]: https://github.com/NixOS/nixpkgs/issues/255262
preCheck = ''
rm -rf src
'';

pytestFlags = [
"${placeholder "out"}"
"--import-mode=importlib"
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm assuming this is still related to #255262, so I'd keep the link to the issue in the comment.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

];

passthru = {
Expand Down
17 changes: 13 additions & 4 deletions pkgs/development/python-modules/fava/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
lib,
buildPythonPackage,
buildNpmPackage,
fetchpatch2,
fetchFromGitHub,
stdenv,
babel,
Expand All @@ -24,17 +25,17 @@
let
src = buildNpmPackage (finalAttrs: {
pname = "fava-frontend";
version = "1.30.7";
version = "1.30.9";

src = fetchFromGitHub {
owner = "beancount";
repo = "fava";
tag = "v${finalAttrs.version}";
hash = "sha256-gO6eJIFp/yWAXFWhUcqkkfk2pA8/vyTxgPRPBmv4a6Q=";
hash = "sha256-/Tnu1SgYhd22HVEzOtJ8YEHyxXuQ9xW0c/1oRyVePXw=";
};
sourceRoot = "${finalAttrs.src.name}/frontend";

npmDepsHash = "sha256-cXIhEzYFpLOxUEY7lhTWW7R3/ptkx7hB9K92Fd2m1Ng=";
npmDepsHash = "sha256-5ee044Ev2FoxcdChZwfHnLQiiP+Ag4bNSAlzEnenAa0=";
makeCacheWritable = true;

preBuild = ''
Expand All @@ -55,7 +56,15 @@ buildPythonPackage {

inherit src;

patches = [ ./dont-compile-frontend.patch ];
patches = [
./dont-compile-frontend.patch
# https://github.com/beancount/fava/pull/2176
(fetchpatch2 {
name = "fix-have-excel-replacement.patch";
url = "https://github.com/beancount/fava/commit/36eba34495d189cd391fae0276aa1b6c94940203.patch?full_index=1";
hash = "sha256-XSkzygnq8eHkIcp1TT7J3NdcLCIwUxDoyipO4M9M3nE=";
})
];

postPatch = ''
substituteInPlace tests/test_cli.py \
Expand Down
Loading