I’m currently using NixOS 24.11pre631921.9ca3f6496142
with the unstable channel and am trying to use a python package which is not available as a nix package.
My shell.nix
is
with import <nixpkgs> {};
with pkgs.python3Packages;
buildPythonPackage rec {
pname = "kafe2";
version = "2.8.3";
format = "pyproject";
src = fetchPypi {
inherit pname version;
hash = "sha256-AAEVjFSNHl1ViJksV7NWzmldmg70Rwl471eNtQHEJkk=";
};
propagatedBuildInputs = [ iminuit numpy numdifftools scipy tabulate matplotlib pyyaml six funcsigs sympy ];
}
following the example of Packaging/Python - NixOS Wiki
However, this results in
❯ nix-shell --run "python3 -c 'import kafe2'"
Sourcing python-remove-tests-dir-hook
Sourcing python-catch-conflicts-hook.sh
Sourcing python-remove-bin-bytecode-hook.sh
Sourcing pypa-build-hook
Using pypaBuildPhase
Sourcing python-runtime-deps-check-hook
Using pythonRuntimeDepsCheckHook
Sourcing pypa-install-hook
Using pypaInstallPhase
Sourcing python-imports-check-hook.sh
Using pythonImportsCheckPhase
Sourcing python-namespaces-hook
Sourcing python-catch-conflicts-hook.sh
Traceback (most recent call last):
File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'kafe2'
I’ve already quickly asked this on Matrix, and received this answer which is quite inconclusive to me as a nix-newbie which is why I am asking this here again