# 2023-08-08 Nixpkgs Architecture Team Meeting #42

**URL:** https://discourse.nixos.org/t/2023-08-08-nixpkgs-architecture-team-meeting-42/31454
**Category:** Nixpkgs Architecture
**Created:** [August 8, 2023, 3:29pm UTC](https://discourse.nixos.org/t/2023-08-08-nixpkgs-architecture-team-meeting-42/31454 "2023-08-08T15:29:28Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Infinisil](https://discourse.nixos.org/user_avatar/discourse.nixos.org/infinisil/32/26523_2.png) [@Infinisil](https://discourse.nixos.org/u/Infinisil)
#### Post date: [August 8, 2023, 3:29pm UTC](https://discourse.nixos.org/t/2023-08-08-nixpkgs-architecture-team-meeting-42/31454/1 "2023-08-08T15:29:28Z")

</div>

- [Past meeting notes](https://github.com/nixpkgs-architecture/meetings)
- (No recording because Jitsi had an error)
- [Matrix announcement](https://matrix.to/#/!djTaTBQyWEPRQxrPTb:nixos.org/$0WsMuTe-Okm4zoAvVUyNk9novpTUE51Ul9zhyURHBsA?via=nixos.org&via=matrix.org&via=nixos.dev)
- Recorded and lead by: @infinisil
- Meeting notes by: @roberth @infinisil
- Attendees: @infinisil @roberth @phaer @hsjobeki @Thorsten

## Agenda/Notes

### [RFC 140](https://github.com/NixOS/rfcs/pull/140)

- Currently blocked on [contributing section pr](https://github.com/NixOS/nixpkgs/pull/245243)

### [Packages Modules WG](https://github.com/nixpkgs-architecture/pkgs-modules)

- Conclusion: [GitHub - nixpkgs-architecture/pkgs-modules: Working group for using modules for packages · GitHub](https://github.com/nixpkgs-architecture/pkgs-modules#conclusion)
  - Merging with the NAT, review new member applications
    - @phaer and @DavHau from the WG applied
    - Will review asynchronously
      - @infinisil will open a private Matrix to discuss applications

  - @DavHau will work on a poc of using drv-parts to Nixpkgs
  - @phaer: not dissatisfied with the wg
  - @infinisil: would like to center the work around the [team issue tracker](https://github.com/nixpkgs-architecture/issues)
  - @infinisil: will update the team workflow documentation (github org readme)

- @tomberek wrote [Package set standardization · Issue #295031 · NixOS/nixpkgs · GitHub](https://github.com/nixpkgs-architecture/issues/issues/21)
  - leave a comment if you’re interested

- @DavHau did a dream2nix performance benchmark: [dream2nix/misc/benchmarks at main · nix-community/dream2nix · GitHub](https://github.com/nix-community/dream2nix/tree/main/misc/benchmarks)
  - More test cases would be good
  - Optionally importing modules could improve it - minimizing the number of options to the actually _used_ options (no cmake etc)
  - Let’s track this in an issue: [Performance benchmark for drv-parts/dream2nix compared to bare derivations · Issue #295030 · NixOS/nixpkgs · GitHub](https://github.com/nixpkgs-architecture/issues/issues/22)
  - @roberth’s more minimal module system PoC: [Simple and quick module system alternative + thoughts and tasks · GitHub](https://gist.github.com/roberth/940dff88ca5f5f95949dc309dbe60a65)
    - Wrote it to prove a point that a module system isn’t too hard and can be faster
    - @phaer: Interested in improvements to more minimal imports
    - See [[RFC 0022] Minimal module list by edolstra · Pull Request #22 · NixOS/rfcs · GitHub](https://github.com/NixOS/rfcs/pull/22) and its linked issues
    - @infinisil: Could be an option to have some declaration of which modules depend on which others, and check that using CI
    - @roberth and @phaer might sync on this
    - @infinisil: Even if you don’t have time to work on it, writing down what should be done is already great, please use issues in [GitHub - nixpkgs-architecture/issues: Repository for tracking problems for the nixpkgs architecture team · GitHub](https://github.com/nixpkgs-architecture/issues)

### Nixpkgs CLI working group search: [Nixpkgs CLI Working Group Member Search](https://discourse.nixos.org/t/nixpkgs-cli-working-group-member-search/30517)

- 3 people are interested.
- Let’s leave it up to the people in the thread to start it

### `pkg.drvPath` string context / DrvDeep

Inquiry by @roberth. Nix team proposes to change the semantics of `.drvPath` not in Nix but in Nixpkgs. Nix team believes it is a strange behavior and should be changed as far as users are concerned.

Current semantics:

- String context of `drvPath` contains the `.drv` file _and_ referenced `.drv` files transitively _and_ the outputs _and_ the outputs of _all build dependencies transitively_.  
Proposed semantics:
- String context of `drvPath` contains the `.drv` file and referenced `.drv` files transitively.

We can not change this in Nix `builtins.derivation{,Strict}` because that would break old expressions.  
Hence the proposal to use the Nixpkgs pin to make the change.

Proposed change in Nixpkgs:

- Change `mkDerivation` to apply `builtins.unsafeDiscardOutputDependency`, which is not unsafe but applies exactly the proposed change in semantics.
  - For input-addressed derivations it is _possible_ to extract output paths without context, but we believe this does not defy anyone’s expectations.

- Check usages of `.drvPath` in Nixpkgs itself

Impact mitigations:

- Allow users to revert their pin of Nixpkgs while they track down the effect of the change. (`grep -F .drvPath`, `nix-diff`?)
  - We expect most usages to be in “advanced functions” which we expect to be comparatively rare outside nixpkgs.

- Add [`builtins.addDrvOutputDependencies`](https://github.com/NixOS/nix/pull/8595) to recover the old semantics where users need it.

#### Discussion

- @infinisil: This could break user tooling, and it won’t emit a warning
- @infinisil: If they reference a .drv they probably would’ve already stripped the output deps anyway
- @infinisil: How about `drvPath2`? For the migration
  - Deprecate `drvPath` and refer users to new attr

- @roberth `drvFile`?
- @infinisil: `nix-build`, `nix repl` use `drvPath` though, so it’s hard to deprecate
- @roberth: Can deprecate `drvPath` when Nix relies on `outputs` etc only
- @infinisil: That’s the proper way to make this change
- @infinisil: `drvPath` is a Nix feature, used by Nix, changing the behavior in Nixpkgs has the same effects as changing it in Nix itself, needs to be properly deprecated in Nix itself
- Relates to [https://github.com/NixOS/rfcs/pull/137](https://github.com/NixOS/rfcs/pull/137)
  - @roberth: but not a prerequisite
