snowfallorg / snowfallorg/lib

question: why are `@args` not forwardable?

Open
#161 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Nix
Stars
628
Forks
64
PR merge metrics
No merged PRs in 30d

Description

Hello,

Great project!

I have simple question I have a shells/custom/default.nix where:

{
  lib,
  pkgs,
  namespace, # if I remove this because unused, the `args` do not contain it anymore?
  ...
}@args:
let
  toolchains = import ../toolchain.nix args; # args is not the full attrset?
in 
{
...
}

I am unsure why I need to name all keys in args in the function arguments, when I want to forward to my function toolchain.nix.
If I remove namespace in {...}@args the below import does not work anymore? Why is that?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading shells/custom/default.nix and the imported ../toolchain.nix to trace how the argument set is used. Check the project’s existing documentation or examples for argument forwarding, and consider the work complete when the behavior and expected usage are clearly documented.

Written by the indexing model from the issue text.

Assessment

Domain
build-system
Issue type
Documentation
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.