Skip to content

Commit

Permalink
Remove custom python override
Browse files Browse the repository at this point in the history
It turns out the python override is fixing the wrong problem. All module
not found issue comes from the fact that `PATH` is overriden and wrong
python3 binary is being used when a program is called from fusesoc.

The change to `PATH` is caused by the python program wrapper, but in
this case it's not necessary for fusesoc. Simply stopping wrapping
fusesoc is enough to fix the issue.
  • Loading branch information
nbdd0121 committed Jan 2, 2024
1 parent 2bcab64 commit 4242a3a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 65 deletions.
10 changes: 9 additions & 1 deletion pkgs/python_ot/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,21 @@
preferWheel = true;
};
};

# Nix wraps python programs which causes PATH to change. We want to keep
# PATH in case a program needs to invoke user-defined programs.
dontwrap-overlay = final: prev: {
fusesoc = prev.fusesoc.overridePythonAttrs {
dontWrapPythonPrograms = true;
};
};
in
poetry2nix.mkPoetryEnv {
projectDir = ./.;
python = import ./python.nix {python = python3;};
overrides = [
preferwheel-overlay
buildreqs-overlay
dontwrap-overlay
poetry2nix.defaultPoetryOverrides
];
}
20 changes: 0 additions & 20 deletions pkgs/python_ot/python.nix

This file was deleted.

44 changes: 0 additions & 44 deletions pkgs/python_ot/sitecustomize.py

This file was deleted.

0 comments on commit 4242a3a

Please sign in to comment.