Skip to content
This repository was archived by the owner on Nov 7, 2023. It is now read-only.

Nix Anti patterns #5

Open
doronbehar opened this issue Oct 28, 2020 · 1 comment
Open

Nix Anti patterns #5

doronbehar opened this issue Oct 28, 2020 · 1 comment

Comments

@doronbehar
Copy link

with pkgs;
with builtins;
with lib;

Doesn't adhere: https://nix.dev/anti-patterns/language.html#with-attrset-expression

@DavHau
Copy link
Owner

DavHau commented Oct 30, 2020

I think builtins and lib should always be in scope. They are basically the standard library for nix. It is quite inconvenient to always write builtins.something and it makes the code a lot less readable.
For with pkgs, I agree with you. That one should probably not be in global scope.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants