nix-community / poetry2nix

Convert poetry projects to nix automagically [maintainer=@adisbladis,@cpcloud]
MIT License
882 stars 451 forks source link

uvloop build env on MacOS lacks SDK framework components #44

Closed coderfromhere closed 4 years ago

coderfromhere commented 4 years ago

poetry.lock

[[package]]
category = "main"
description = "Fast implementation of asyncio event loop on top of libuv"
name = "uvloop"
optional = false
python-versions = "*"
version = "0.14.0"

[metadata]
content-hash = "2a7f16b9594c33d61114990af29b5196b926178886f940df04c9bbf985653426"
python-versions = "^3.7"

[metadata.files]
uvloop = [
    {file = "uvloop-0.14.0-cp35-cp35m-macosx_10_11_x86_64.whl", hash = "sha256:08b109f0213af392150e2fe6f81d33261bb5ce968a288eb698aad4f46eb711bd"},
    {file = "uvloop-0.14.0-cp35-cp35m-manylinux2010_x86_64.whl", hash = "sha256:4544dcf77d74f3a84f03dd6278174575c44c67d7165d4c42c71db3fdc3860726"},
    {file = "uvloop-0.14.0-cp36-cp36m-macosx_10_11_x86_64.whl", hash = "sha256:b4f591aa4b3fa7f32fb51e2ee9fea1b495eb75b0b3c8d0ca52514ad675ae63f7"},
    {file = "uvloop-0.14.0-cp36-cp36m-manylinux2010_x86_64.whl", hash = "sha256:f07909cd9fc08c52d294b1570bba92186181ca01fe3dc9ffba68955273dd7362"},
    {file = "uvloop-0.14.0-cp37-cp37m-macosx_10_11_x86_64.whl", hash = "sha256:afd5513c0ae414ec71d24f6f123614a80f3d27ca655a4fcf6cabe50994cc1891"},
    {file = "uvloop-0.14.0-cp37-cp37m-manylinux2010_x86_64.whl", hash = "sha256:e7514d7a48c063226b7d06617cbb12a14278d4323a065a8d46a7962686ce2e95"},
    {file = "uvloop-0.14.0-cp38-cp38-macosx_10_11_x86_64.whl", hash = "sha256:bcac356d62edd330080aed082e78d4b580ff260a677508718f88016333e2c9c5"},
    {file = "uvloop-0.14.0-cp38-cp38-manylinux2010_x86_64.whl", hash = "sha256:4315d2ec3ca393dd5bc0b0089d23101276778c304d42faff5dc4579cb6caef09"},
    {file = "uvloop-0.14.0.tar.gz", hash = "sha256:123ac9c0c7dd71464f58f1b4ee0bbd81285d96cdda8bc3519281b8973e3a461e"},
]

shell.nix

with (import (builtins.fetchGit {
    name = "my-project";
    url = https://github.com/nixos/nixpkgs/;
    ref = "refs/heads/master";
    rev = "6f545410b593a0d1b78806aa878f95ee3f3d4a4a";
}) {});

let src = builtins.fetchGit {
    name = "poetry-nix";
    url = https://github.com/nix-community/poetry2nix/;
    ref = "refs/heads/master";
    rev = "82166c8a498b0ea1401109ad9c2b71a3796725a0";
}; in with import "${src.outPath}/overlay.nix" pkgs pkgs;

let
    pythonEnv = poetry2nix.mkPoetryEnv {
        poetrylock = ./poetry.lock;
    };
in

mkShell {
    name = "my-project";

    buildInputs = [
        python37Full
        python37Packages.virtualenv
        pythonEnv
        poetry
        # usually required as python runtime dependencies
        ncurses
        libxml2
        libxslt
        libzip
        zlib
        cacert
    ];
    shellHook = ''
        # Set SOURCE_DATE_EPOCH so that we can use python wheels.
        # This compromises immutability, but is what we need
        # to allow package installs from PyPI
        export SOURCE_DATE_EPOCH=$(date +%s)

        VENV_DIR=$PWD/.venv

        export PATH=$VENV_DIR/bin:$PATH
        export LANG=en_US.UTF-8

        # https://python-poetry.org/docs/configuration/
        export POETRY_VIRTUALENVS_CREATE=false
        export PIP_CACHE_DIR=$PWD/.local/pip-cache

        # Dirty fix for Linux systems
        # https://nixos.wiki/wiki/Packaging/Quirks_and_Caveats
        export LD_LIBRARY_PATH=${stdenv.cc.cc.lib}/lib/:$LD_LIBRARY_PATH
    '';

}

The result:

nix-shell
these derivations will be built:
  /nix/store/7nqmdxayjwhgpcn3j4xid9bq75szw4hg-python3.7-uvloop-0.14.0.drv
  /nix/store/na80lsk1p810bzxx81fs20sibdq9hy21-python3-3.7.6-env.drv
building '/nix/store/7nqmdxayjwhgpcn3j4xid9bq75szw4hg-python3.7-uvloop-0.14.0.drv'...
Sourcing python-catch-conflicts-hook.sh
Sourcing python-remove-bin-bytecode-hook.sh
Sourcing setuptools-build-hook
Using setuptoolsBuildPhase
Using setuptoolsShellHook
Sourcing pip-install-hook
Using pipInstallPhase
Sourcing python-imports-check-hook.sh
Using pythonImportsCheckPhase
unpacking sources
unpacking source archive /nix/store/1a6asiaypg1p6w8ri5hynaf2qcnlw9wj-uvloop-0.14.0.tar.gz
source root is uvloop-0.14.0
setting SOURCE_DATE_EPOCH to timestamp 1572979398 of file uvloop-0.14.0/uvloop/loop.c
patching sources
configuring
fixing libtool script ./vendor/libuv/ltmain.sh
no configure script, doing nothing
building
Executing setuptoolsBuildPhase
running bdist_wheel
running build
running build_py
creating build
creating build/lib.macosx-10.6-x86_64-3.7
creating build/lib.macosx-10.6-x86_64-3.7/uvloop
copying uvloop/_noop.py -> build/lib.macosx-10.6-x86_64-3.7/uvloop
copying uvloop/_testbase.py -> build/lib.macosx-10.6-x86_64-3.7/uvloop
copying uvloop/__init__.py -> build/lib.macosx-10.6-x86_64-3.7/uvloop
copying uvloop/_patch.py -> build/lib.macosx-10.6-x86_64-3.7/uvloop
running egg_info
writing uvloop.egg-info/PKG-INFO
writing dependency_links to uvloop.egg-info/dependency_links.txt
writing top-level names to uvloop.egg-info/top_level.txt
reading manifest file 'uvloop.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no previously-included files matching '*' found under directory 'vendor/libuv/.git'
warning: no previously-included files matching '*' found under directory 'vendor/libuv/docs'
warning: no previously-included files matching '*' found under directory 'vendor/libuv/img'
writing manifest file 'uvloop.egg-info/SOURCES.txt'
copying uvloop/cbhandles.pxd -> build/lib.macosx-10.6-x86_64-3.7/uvloop
copying uvloop/cbhandles.pyx -> build/lib.macosx-10.6-x86_64-3.7/uvloop
copying uvloop/dns.pyx -> build/lib.macosx-10.6-x86_64-3.7/uvloop
copying uvloop/errors.pyx -> build/lib.macosx-10.6-x86_64-3.7/uvloop
copying uvloop/loop.c -> build/lib.macosx-10.6-x86_64-3.7/uvloop
copying uvloop/loop.pxd -> build/lib.macosx-10.6-x86_64-3.7/uvloop
copying uvloop/loop.pyx -> build/lib.macosx-10.6-x86_64-3.7/uvloop
copying uvloop/lru.pyx -> build/lib.macosx-10.6-x86_64-3.7/uvloop
copying uvloop/pseudosock.pyx -> build/lib.macosx-10.6-x86_64-3.7/uvloop
copying uvloop/request.pxd -> build/lib.macosx-10.6-x86_64-3.7/uvloop
copying uvloop/request.pyx -> build/lib.macosx-10.6-x86_64-3.7/uvloop
copying uvloop/server.pxd -> build/lib.macosx-10.6-x86_64-3.7/uvloop
copying uvloop/server.pyx -> build/lib.macosx-10.6-x86_64-3.7/uvloop
copying uvloop/sslproto.pxd -> build/lib.macosx-10.6-x86_64-3.7/uvloop
copying uvloop/sslproto.pyx -> build/lib.macosx-10.6-x86_64-3.7/uvloop
creating build/lib.macosx-10.6-x86_64-3.7/uvloop/handles
copying uvloop/handles/async_.pxd -> build/lib.macosx-10.6-x86_64-3.7/uvloop/handles
copying uvloop/handles/async_.pyx -> build/lib.macosx-10.6-x86_64-3.7/uvloop/handles
copying uvloop/handles/basetransport.pxd -> build/lib.macosx-10.6-x86_64-3.7/uvloop/handles
copying uvloop/handles/basetransport.pyx -> build/lib.macosx-10.6-x86_64-3.7/uvloop/handles
copying uvloop/handles/check.pxd -> build/lib.macosx-10.6-x86_64-3.7/uvloop/handles
copying uvloop/handles/check.pyx -> build/lib.macosx-10.6-x86_64-3.7/uvloop/handles
copying uvloop/handles/handle.pxd -> build/lib.macosx-10.6-x86_64-3.7/uvloop/handles
copying uvloop/handles/handle.pyx -> build/lib.macosx-10.6-x86_64-3.7/uvloop/handles
copying uvloop/handles/idle.pxd -> build/lib.macosx-10.6-x86_64-3.7/uvloop/handles
copying uvloop/handles/idle.pyx -> build/lib.macosx-10.6-x86_64-3.7/uvloop/handles
copying uvloop/handles/pipe.pxd -> build/lib.macosx-10.6-x86_64-3.7/uvloop/handles
copying uvloop/handles/pipe.pyx -> build/lib.macosx-10.6-x86_64-3.7/uvloop/handles
copying uvloop/handles/poll.pxd -> build/lib.macosx-10.6-x86_64-3.7/uvloop/handles
copying uvloop/handles/poll.pyx -> build/lib.macosx-10.6-x86_64-3.7/uvloop/handles
copying uvloop/handles/process.pxd -> build/lib.macosx-10.6-x86_64-3.7/uvloop/handles
copying uvloop/handles/process.pyx -> build/lib.macosx-10.6-x86_64-3.7/uvloop/handles
copying uvloop/handles/stream.pxd -> build/lib.macosx-10.6-x86_64-3.7/uvloop/handles
copying uvloop/handles/stream.pyx -> build/lib.macosx-10.6-x86_64-3.7/uvloop/handles
copying uvloop/handles/streamserver.pxd -> build/lib.macosx-10.6-x86_64-3.7/uvloop/handles
copying uvloop/handles/streamserver.pyx -> build/lib.macosx-10.6-x86_64-3.7/uvloop/handles
copying uvloop/handles/tcp.pxd -> build/lib.macosx-10.6-x86_64-3.7/uvloop/handles
copying uvloop/handles/tcp.pyx -> build/lib.macosx-10.6-x86_64-3.7/uvloop/handles
copying uvloop/handles/timer.pxd -> build/lib.macosx-10.6-x86_64-3.7/uvloop/handles
copying uvloop/handles/timer.pyx -> build/lib.macosx-10.6-x86_64-3.7/uvloop/handles
copying uvloop/handles/udp.pxd -> build/lib.macosx-10.6-x86_64-3.7/uvloop/handles
copying uvloop/handles/udp.pyx -> build/lib.macosx-10.6-x86_64-3.7/uvloop/handles
creating build/lib.macosx-10.6-x86_64-3.7/uvloop/includes
copying uvloop/includes/__init__.py -> build/lib.macosx-10.6-x86_64-3.7/uvloop/includes
copying uvloop/includes/compat.h -> build/lib.macosx-10.6-x86_64-3.7/uvloop/includes
copying uvloop/includes/consts.pxi -> build/lib.macosx-10.6-x86_64-3.7/uvloop/includes
copying uvloop/includes/debug.h -> build/lib.macosx-10.6-x86_64-3.7/uvloop/includes
copying uvloop/includes/debug.pxd -> build/lib.macosx-10.6-x86_64-3.7/uvloop/includes
copying uvloop/includes/flowcontrol.pxd -> build/lib.macosx-10.6-x86_64-3.7/uvloop/includes
copying uvloop/includes/fork_handler.h -> build/lib.macosx-10.6-x86_64-3.7/uvloop/includes
copying uvloop/includes/python.pxd -> build/lib.macosx-10.6-x86_64-3.7/uvloop/includes
copying uvloop/includes/stdlib.pxi -> build/lib.macosx-10.6-x86_64-3.7/uvloop/includes
copying uvloop/includes/system.pxd -> build/lib.macosx-10.6-x86_64-3.7/uvloop/includes
copying uvloop/includes/uv.pxd -> build/lib.macosx-10.6-x86_64-3.7/uvloop/includes
running build_ext
checking for a BSD-compatible install... /nix/store/4fwpaqkhp351m7zkjk2vki9hkrchjhkd-coreutils-8.31/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /nix/store/4fwpaqkhp351m7zkjk2vki9hkrchjhkd-coreutils-8.31/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking build system type... x86_64-apple-darwin19.2.0
checking host system type... x86_64-apple-darwin19.2.0
checking for gcc... clang
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether clang accepts -g... yes
checking for clang option to accept ISO C89... none needed
checking whether clang understands -c and -o together... yes
checking for style of include used by make... GNU
checking dependency style of clang... gcc3
checking if clang supports -pedantic flag... yes
checking for clang way to treat warnings as errors... -Werror
checking if clang supports -fvisibility=hidden... yes
checking if clang supports -g flag... yes
checking if clang supports -std=gnu89 flag... yes
checking if clang supports -Wall flag... yes
checking if clang supports -Wextra flag... yes
checking if clang supports -Wno-long-long flag... yes
checking if clang supports -Wno-unused-parameter flag... yes
checking if clang supports -Wstrict-prototypes flag... yes
checking the archiver (ar) interface... ar
checking how to print strings... printf
checking for a sed that does not truncate output... /nix/store/ljrr4g1qdhrimqh31lvcjg717sqdx166-gnused-4.7/bin/sed
checking for grep that handles long lines and -e... /nix/store/fiprsfm9rp7s1vg98q36v1d3a16d4gds-gnugrep-3.3/bin/grep
checking for egrep... /nix/store/fiprsfm9rp7s1vg98q36v1d3a16d4gds-gnugrep-3.3/bin/grep -E
checking for fgrep... /nix/store/fiprsfm9rp7s1vg98q36v1d3a16d4gds-gnugrep-3.3/bin/grep -F
checking for ld used by clang... ld
checking if the linker (ld) is GNU ld... no
checking for BSD- or MS-compatible name lister (nm)... nm
checking the name lister (nm) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 196608
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking how to convert x86_64-apple-darwin19.2.0 file names to x86_64-apple-darwin19.2.0 format... func_convert_file_noop
checking how to convert x86_64-apple-darwin19.2.0 file names to toolchain format... func_convert_file_noop
checking for ld option to reload object files... -r
checking for objdump... no
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for archiver @FILE support... no
checking for strip... strip
checking for ranlib... ranlib
checking command to parse nm output from clang object... ok
checking for sysroot... no
checking for mt... no
checking if : is a manifest tool... no
checking for dsymutil... dsymutil
checking for nmedit... no
checking for lipo... lipo
checking for otool... otool
checking for otool64... no
checking for -single_module linker flag... yes
checking for -exported_symbols_list linker flag... yes
checking for -force_load linker flag... yes
checking how to run the C preprocessor... clang -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if clang supports -fno-rtti -fno-exceptions... yes
checking for clang option to produce PIC... -fno-common -DPIC
checking if clang PIC flag -fno-common -DPIC works... yes
checking if clang static flag -static works... no
checking if clang supports -c -o file.o... yes
checking if clang supports -c -o file.o... (cached) yes
checking whether the clang linker (ld) supports shared libraries... yes
checking dynamic linker characteristics... darwin19.2.0 dyld
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking whether make supports nested variables... (cached) yes
checking for dlopen in -ldl... yes
checking for kstat_lookup in -lkstat... no
checking for gethostbyname in -lnsl... no
checking for perfstat_cpu in -lperfstat... no
checking for pthread_mutex_init in -lpthread... yes
checking for clock_gettime in -lrt... no
checking for sendfile in -lsendfile... no
checking for socket in -lsocket... no
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... no
checking sys/ahafs_evProds.h usability... no
checking sys/ahafs_evProds.h presence... no
checking for sys/ahafs_evProds.h... no
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating libuv.pc
config.status: executing depfiles commands
config.status: executing libtool commands
  CC       src/libuv_la-fs-poll.lo
  CC       src/libuv_la-idna.lo
  CC       src/libuv_la-inet.lo
  CC       src/libuv_la-random.lo
  CC       src/libuv_la-strscpy.lo
  CC       src/libuv_la-threadpool.lo
  CC       src/libuv_la-timer.lo
  CC       src/libuv_la-uv-data-getter-setters.lo
  CC       src/libuv_la-uv-common.lo
  CC       src/libuv_la-version.lo
  CC       src/unix/libuv_la-async.lo
  CC       src/unix/libuv_la-core.lo
  CC       src/unix/libuv_la-dl.lo
  CC       src/unix/libuv_la-fs.lo
  CC       src/unix/libuv_la-getaddrinfo.lo
  CC       src/unix/libuv_la-getnameinfo.lo
  CC       src/unix/libuv_la-loop-watcher.lo
  CC       src/unix/libuv_la-loop.lo
  CC       src/unix/libuv_la-pipe.lo
  CC       src/unix/libuv_la-poll.lo
  CC       src/unix/libuv_la-process.lo
  CC       src/unix/libuv_la-random-devurandom.lo
  CC       src/unix/libuv_la-signal.lo
  CC       src/unix/libuv_la-stream.lo
  CC       src/unix/libuv_la-tcp.lo
  CC       src/unix/libuv_la-thread.lo
  CC       src/unix/libuv_la-tty.lo
  CC       src/unix/libuv_la-udp.lo
  CC       src/unix/libuv_la-bsd-ifaddrs.lo
  CC       src/unix/libuv_la-darwin.lo
  CC       src/unix/libuv_la-darwin-proctitle.lo
  CC       src/unix/libuv_la-fsevents.lo
  CC       src/unix/libuv_la-kqueue.lo
  CC       src/unix/libuv_la-proctitle.lo
src/unix/fsevents.c:50:10: fatal error: 'CoreServices/CoreServices.h' file not found
#include <CoreServices/CoreServices.h>
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
make: *** [Makefile:2564: src/unix/libuv_la-fsevents.lo] Error 1
make: *** Waiting for unfinished jobs....
src/unix/darwin-proctitle.c:34:11: fatal error: 'ApplicationServices/ApplicationServices.h' file not found
# include <ApplicationServices/ApplicationServices.h>
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
make: *** [Makefile:2557: src/unix/libuv_la-darwin-proctitle.lo] Error 1
Traceback (most recent call last):
  File "nix_run_setup", line 8, in <module>
    exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\\r\\n', '\\n'), __file__, 'exec'))
  File "setup.py", line 270, in <module>
    test_suite='tests.suite'
  File "/nix/store/k29vx88f57rd1yafdbwgz3ynnhsnrmzv-python3.7-setuptools-44.0.0/lib/python3.7/site-packages/setuptools/__init__.py", line 145, in setup
    return distutils.core.setup(**attrs)
  File "/nix/store/rha7vqq2xg37z37g7wzqa7cnrxnav5x9-python3-3.7.6/lib/python3.7/distutils/core.py", line 148, in setup
    dist.run_commands()
  File "/nix/store/rha7vqq2xg37z37g7wzqa7cnrxnav5x9-python3-3.7.6/lib/python3.7/distutils/dist.py", line 966, in run_commands
    self.run_command(cmd)
  File "/nix/store/rha7vqq2xg37z37g7wzqa7cnrxnav5x9-python3-3.7.6/lib/python3.7/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
  File "/nix/store/5vhhlk0x582jd58n9izkgjb26d16c2p9-python3.7-python3.7-wheel-0.33.6/lib/python3.7/site-packages/wheel/bdist_wheel.py", line 192, in run
    self.run_command('build')
  File "/nix/store/rha7vqq2xg37z37g7wzqa7cnrxnav5x9-python3-3.7.6/lib/python3.7/distutils/cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "/nix/store/rha7vqq2xg37z37g7wzqa7cnrxnav5x9-python3-3.7.6/lib/python3.7/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
  File "/nix/store/rha7vqq2xg37z37g7wzqa7cnrxnav5x9-python3-3.7.6/lib/python3.7/distutils/command/build.py", line 135, in run
    self.run_command(cmd_name)
  File "/nix/store/rha7vqq2xg37z37g7wzqa7cnrxnav5x9-python3-3.7.6/lib/python3.7/distutils/cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "/nix/store/rha7vqq2xg37z37g7wzqa7cnrxnav5x9-python3-3.7.6/lib/python3.7/distutils/dist.py", line 985, in run_command
    cmd_obj.run()
  File "/nix/store/k29vx88f57rd1yafdbwgz3ynnhsnrmzv-python3.7-setuptools-44.0.0/lib/python3.7/site-packages/setuptools/command/build_ext.py", line 84, in run
    _build_ext.run(self)
  File "/nix/store/rha7vqq2xg37z37g7wzqa7cnrxnav5x9-python3-3.7.6/lib/python3.7/distutils/command/build_ext.py", line 340, in run
    self.build_extensions()
  File "setup.py", line 198, in build_extensions
    self.build_libuv()
  File "setup.py", line 185, in build_libuv
    cwd=LIBUV_BUILD_DIR, env=env, check=True)
  File "/nix/store/rha7vqq2xg37z37g7wzqa7cnrxnav5x9-python3-3.7.6/lib/python3.7/subprocess.py", line 512, in run
    output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['make', '-j8', 'CFLAGS= -O2 -fPIC ']' returned non-zero exit status 2.
builder for '/nix/store/7nqmdxayjwhgpcn3j4xid9bq75szw4hg-python3.7-uvloop-0.14.0.drv' failed with exit code 1
cannot build derivation '/nix/store/na80lsk1p810bzxx81fs20sibdq9hy21-python3-3.7.6-env.drv': 1 dependencies couldn't be built
error: build of '/nix/store/na80lsk1p810bzxx81fs20sibdq9hy21-python3-3.7.6-env.drv' failed

I guess buildInputs of uvloop needs to be extended with ++ lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.CoreServices darwin.apple_sdk.frameworks.ApplicationServices ], but if I understand it correctly, it's already taken care of at https://github.com/NixOS/nixpkgs/blob/ec8fd9cc3450b78573ccc8684fce8aa504705af3/pkgs/development/python-modules/uvloop/default.nix#L27

I wonder if it's my local issue (running it on MacOS Catalina, Xcode and xcode-select --install, Poetry-1.0.2) or something that others can reproduce in their environment too?

adisbladis commented 4 years ago

We're not using python packages from nixpkgs but generating our own from scratch. You're gonna have to replicate what nixpkgs is doing in an override, preferably by adding an entry to https://github.com/nix-community/poetry2nix/blob/master/overrides.nix.

This is how you can do it in your own default.nix: https://github.com/nix-community/poetry2nix/blob/master/tests/override-support/default.nix#L11.

coderfromhere commented 4 years ago

Great, thanks! That's something that I was lacking in my understanding of the overrides conecept. I'll prepare a PR.

But what about the long-term support? It seems to me that the current repo's overrides are kind of duplicating expressions from the main nixpkgs namespace. Is it technically possible to override the existing uvloop derivation with the values retrieved from the poetry.lock (the version and the downloadable source), and what are the downsides and limitations of it?

adisbladis commented 4 years ago

@max-arrival Eventually I'm hoping that the overrides model used in poetry2nix can be adopted in nixpkgs so that more solutions can benefit from it.

It is possible at least in theory to override nixpkgs derivations but these often come with patches required to build, customisations, they have the wrong attr names etc etc. I foresee a lot of problems using this approach.

I'd much rather adopt the overlay like overrides model in nixpkgs.