!yUrHuDcxUngfTlDbiy:matrix.org

flakelight

38 Members
https://github.com/nix-community/flakelight12 Servers

Load older messages


SenderMessageTime
13 Mar 2024
@accelbread:matrix.orgaccelbreadAh17:02:05
@cmacr.ae:matrix.orgcmacraeits under pythonPackages, is that perhaps why?17:02:44
@accelbread:matrix.orgaccelbread the inherit buildPythonPackage; there adds/overrides stuff to the package set for that callPackage 17:02:48
@accelbread:matrix.orgaccelbread if its pythonPackages.buildPythonPackage you'll want your to take { pythonPackages } and go from there 17:03:51
@cmacr.ae:matrix.orgcmacraeoh good, I'm glad you suggested that, haha. I thought "maybe I just use that, but then I don't want it to all be in scope", but I guess it doesn't matter anyway because of lazy eval? 17:04:46
@accelbread:matrix.orgaccelbreadYeah, lazy eval takes care of it17:05:02
@accelbread:matrix.orgaccelbread Though I think I usually pull in like python3 and do python3.buildPythonPackage? Don't remember at the moment and only have python stuff on work laptop ha 17:05:54
@accelbread:matrix.orgaccelbread Though I usually end up needing specific python versions like python311 or python312 17:06:45
@accelbread:matrix.orgaccelbread Ah its python3.pkgs.buildPythonPackage 17:08:43
@cmacr.ae:matrix.orgcmacraeahhh, that's it17:08:52
@cmacr.ae:matrix.orgcmacraethank you! 17:08:57
@cmacr.ae:matrix.orgcmacraewoo17:09:24
@cmacr.ae:matrix.orgcmacraeit worked :)17:09:29
@accelbread:matrix.orgaccelbreadNice. Python stuff ends up kinda complicated. Nix imo makes it a lot easier but python is still a bit of a mess ha17:10:02
@accelbread:matrix.orgaccelbreadI've had an issue where pytest needs 3.12 and pylsp needs 3.11 but I want both to share a python 🙃17:10:56
@cmacr.ae:matrix.orgcmacraeabsolutely - I've joined a company where I'm just seeing these horrible solutions to managing lang & lib versions (python virtualenv, nvm, etc...) and I absolutely have to show them the Nix way, haha17:11:44
@accelbread:matrix.orgaccelbread For stuff like tests (we write C code with tests usually in python), I usually use a venv; people can just do python -m venv venv and if it doesn't work, I have them do nix run nixpkgs#python312 -- -m venv venv 17:13:33
@accelbread:matrix.orgaccelbreadIdeally could just have a package to run, but machnix is deprecated and dream2nix isn't ready to replace it yet17:14:11
@cmacr.ae:matrix.orgcmacraenice, yeah for sure. there's the new python nix stuff that the author/leader of dream2nix just released the other week, right?17:15:01
@cmacr.ae:matrix.orgcmacraedid you see that? I haven't dug into it yet17:15:12
@accelbread:matrix.orgaccelbreadOh, I wasn't aware17:15:46
@accelbread:matrix.orgaccelbreadI'll have to look into that; would be nice to package our tests properly lol17:16:05
@cmacr.ae:matrix.orgcmacraeyeah it looked pretty comprehensive when I had a brief read over the site/docs17:17:50
@accelbread:matrix.orgaccelbreadWhat I need is just a function that takes a locked requirements.txt, and gives me a nix file that I can import to get a python environment matching the requirements.txt17:19:32
@cmacr.ae:matrix.orgcmacrae ah yeah, like all the old 2nix tools. as you already mentioned, dream2nix looks very promising 17:20:25
@accelbread:matrix.orgaccelbreadhmm still seems like a bit of a hefty dependency. pip2nix is almost perfect except for being quite out-of-date and not working on Mac. Maybe I ought to just fork it and update it one of these days 17:26:20
@cmacr.ae:matrix.orgcmacraeyeah that's a fair point. I think it has some very lofty goals and is nothing like the smaller converters we're historically used to17:32:22
@accelbread:matrix.orgaccelbreadYeah, I'm also usually not creating a package, but creating a python environment used by devShell, formatter, and multiple packages17:33:09
@accelbread:matrix.orgaccelbreadOr doing something like creating the python env esp-idf requires, and using the esp-idf build system in my derivation17:33:50
@cmacr.ae:matrix.orgcmacraeyeah exactly 👍️17:56:15

Show newer messages


Back to Room ListRoom Version: 10