-
-
Notifications
You must be signed in to change notification settings - Fork 14.1k
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
stdenv.mkDerivation: add support for env attrset #76732
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jtojnar
requested review from
adisbladis,
alyssais,
basvandijk,
cdepillabout,
edolstra,
Ericson2314,
etu,
FRidh,
jonringer,
LnL7,
matthewbauer,
Mic92,
nbp,
peti,
thoughtpolice,
ttuegel and
zimbatm
as code owners
December 31, 2019 07:29
ofborg
bot
added
6.topic: emacs
Text editor
6.topic: GNOME
GNOME desktop environment and its underlying platform
6.topic: golang
6.topic: haskell
6.topic: lua
6.topic: pantheon
The Pantheon desktop environment
6.topic: printing
6.topic: python
6.topic: qt/kde
6.topic: ruby
6.topic: rust
labels
Dec 31, 2019
Please note that this won't fix too much leaf-pkgs, those appear to be pretty broken as those don't have an `out`-output.
ryantm
added
the
2.status: merge conflict
This PR has merge conflicts with the target branch
label
Oct 3, 2020
anything that helps with __structuredAttrs is ok in my book. |
teto
approved these changes
Jan 29, 2021
I marked this as stale due to inactivity. → More info |
stale
bot
added
the
2.status: stale
https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md
label
Jul 29, 2021
env attrset added in #175649 |
12 tasks
Was having lists in env automatically have toString run on them ever considered? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
2.status: merge conflict
This PR has merge conflicts with the target branch
2.status: stale
https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md
6.topic: emacs
Text editor
6.topic: GNOME
GNOME desktop environment and its underlying platform
6.topic: golang
6.topic: haskell
6.topic: lua
6.topic: pantheon
The Pantheon desktop environment
6.topic: printing
6.topic: python
6.topic: qt/kde
6.topic: ruby
6.topic: rust
6.topic: stdenv
Standard environment
6.topic: xfce
The Xfce Desktop Environment
8.has: documentation
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation for this change
For
__structuredAttrs
, we want to distinguish regular structured variables from string-coercible variables that will be exported to the environment. The environment variables will be passed tomkDerivation
as attributes of theenv
attribute set.To lower the review workload of the
__structuredAttrs
PR, we have decided to make theenv
mechanism available as a vanguard. Until the support for__structuredAttrs
is implemented, the content of theenv
attrset will be merged into the attrset passed tomkDerivation
.The content of the attributes in
env
is checked for validity and conflicts with the rest ofmkDerivation
attributes. The current mechanism should produce the same derivations as the original, thus require no rebuilds.This change is backwards compatible for now, as Nix does not allow attrsets to be passed to derivation without
__structuredAttrs
enabled, and the current mechanism handles the non-attrsets as before. We reserve the right to requireenv
to be attrset in the future.Only the first commit is important, the rest is cherry-picked from #72074.
cc @globin @Ericson2314 @Ma27