Closed coderfromhere closed 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.
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?
@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.
poetry.lock
shell.nix
The result:
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#L27I 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?