Replies: 1 comment 1 reply
-
As you noted, the file in question is an anonymous function. More over it's a "module", using the same module system as NixOS (and home-manager, nix-darwin, flake-parts, others). This module is included in an argument to =dream2nix.lib.evalModules= in https://github.com/nix-community/dream2nix/blob/main/examples/packages/single-language/python-project/flake.nix. =lib= is nixpkgs library, so you can use any function from there and find them i.e. via noogle https://noogle.dev/f/lib/importTOML Hope that helps? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, this may be more a general (noob) Nix question but it's also related to examples in this repo. Please tell me if there's a more appropriate place to ask for help.
I'm a Nix beginner and while I think I understand the Nix language itself, I'm lost in where the attributes actually come from. My goal is to prepare a dev environment for our mostly-Python project.
So here's your example
default.nix
from examples/packages/single-language/python-project/:I understand the whole file defines an anonymous function. But where does for example
lib
come from? Who passes it there? How do I find out that I can uselib
orlib.importTOML
in my nix files?Beta Was this translation helpful? Give feedback.
All reactions