I want to create nix file witch create env for python with uniswap-python
library:
let
uni-py = pkgs.python3Packages.buildPythonPackage rec {
name = "uniswap-python";
version = "v0.7.1";
src = pkgs.fetchFromGitHub {
owner = "uniswap-python";
repo = "${name}";
rev = "${version}";
sha256 = "Uw77XsKDlvKECQIIE0P577mktb/FOSweOccDHFDZVaY=";
};
propagatedBuildInputs = with pkgs.python3Packages; [ web3 ];
meta = {
homepage = "https://github.com/uniswap-python/uniswap-python";
description = "uniswap-python";
license = lib.licenses.mit;
maintainers = with maintainers; [ uniswap-python ];
};
};
in mkShell {
name = "uni-py";
buildInputs = with pkgs.python3Packages; [ web3 uni-py ];
shellHook = ''
echo "Whatever makes this happen."
'';
}
run with nix-shell ue.nix
get this error:
Executing setuptoolsBuildPhase
Traceback (most recent call last):
File "/build/source/nix_run_setup", line 8, in <module>
exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\\r\\n', '\\n'), __file__, 'exec'))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/nix/store/yvhwsfbh4bc99vfvwpaa70m4yng4pvpz-python3-3.11.8/lib/python3.11/tokenize.py", line 396, in open
buffer = _builtin_open(filename, 'rb')
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: 'setup.py'
/nix/store/10i1kjjq5szjn1gp6418x8bc1hswqc90-stdenv-linux/setup: line 1553: pop_var_context: head of shell_variables not a function context
error: builder for '/nix/store/mfnkr2ygb3kazkw91h3xhzrfwlya3sc9-python3.11-uniswap-python.drv' failed with exit code 1;
last 10 log lines:
> Executing setuptoolsBuildPhase
> Traceback (most recent call last):
> File "/build/source/nix_run_setup", line 8, in <module>
> exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\\r\\n', '\\n'), __file__, 'exec'))
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> File "/nix/store/yvhwsfbh4bc99vfvwpaa70m4yng4pvpz-python3-3.11.8/lib/python3.11/tokenize.py", line 396, in open
> buffer = _builtin_open(filename, 'rb')
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> FileNotFoundError: [Errno 2] No such file or directory: 'setup.py'
> /nix/store/10i1kjjq5szjn1gp6418x8bc1hswqc90-stdenv-linux/setup: line 1553: pop_var_context: head of shell_variables not a function context
For full logs, run 'nix-store -l /nix/store/mfnkr2ygb3kazkw91h3xhzrfwlya3sc9-python3.11-uniswap-python.drv'.
Please help to fix