Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add builtins.addDrvOutputDependencies #9216

Merged

Conversation

Ericson2314
Copy link
Member

@Ericson2314 Ericson2314 commented Oct 23, 2023

Motivation

End goal: make (mkDerivation x).drvPath behave like a non-DrvDeep context.
Problem: users won't be able to recover the DrvDeep behavior when nixpkgs makes this change.
Solution: add this primop.

The new primop is fairly simple, and is supposed to complement other existing ones (builtins.storePath, builtins.outputOf) so there are simple ways to construct strings with every type of string context element.

(It allows nothing we couldn't already do with builtins.getContext and builtins.appendContext, which is also true of those other two primops.)

Context

This was originally in #8595, but then it was proposed to land some doc changes separately. So now the code changes proper is just moved to this, and the doc will be done in that.

Progress towards #7910.

Priorities

Add 👍 to pull requests you find important.

@github-actions github-actions bot added the with-tests Issues related to testing. PRs with tests have some priority label Oct 23, 2023
@Ericson2314 Ericson2314 mentioned this pull request Oct 23, 2023
8 tasks
Copy link
Member

@roberth roberth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

The finished part of #8595, which I see you've already re-titled to be about the (prosaic) docs.

(Just need to remove some links for now)

End goal: make `(mkDerivation x).drvPath` behave like a non-DrvDeep
context.

Problem: users won't be able to recover the DrvDeep behavior when
nixpkgs makes this change.

Solution: add this primop.

The new primop is fairly simple, and is supposed to complement other
existing ones (`builtins.storePath`, `builtins.outputOf`) so there are
simple ways to construct strings with every type of string context
element.

(It allows nothing we couldn't already do with `builtins.getContext` and `builtins.appendContext`, which is also true of those other two primops.)

This was originally in NixOS#8595, but then it was proposed to land some doc
changes separately. So now the code changes proper is just moved to
this, and the doc will be done in that.

Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
Co-authored-by: Théophane Hufschmitt <7226587+thufschmitt@users.nore
github.com>
Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io
@Ericson2314 Ericson2314 merged commit a58d7f1 into NixOS:master Oct 23, 2023
8 checks passed
tebowy pushed a commit to tebowy/nix that referenced this pull request Jul 11, 2024
…encies-pre

Add `builtins.addDrvOutputDependencies`

(cherry picked from commit a58d7f1)
Change-Id: Ia5a1790bf29dfaf29287cc35cdae6b6d650e7a83
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
with-tests Issues related to testing. PRs with tests have some priority
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants