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

stdenv: support opt-in __structuredAttrs #175649

Merged
merged 16 commits into from
Dec 10, 2022

Commits on Dec 8, 2022

  1. stdenv: support opt-in __structuredAttrs

    Co-authored-by: Robin Gloster <mail@glob.in>
    
    stdenv: print message if structuredAttrs is enabled
    
    stdenv: add _append
    
    reduces the chance of a user doing it wrong
    
    fix nix develop issue
    
    output hooks don't work yet in nix develop though
    
    making $outputs be the same on non-structuredAttrs and structuredAttrs
    is too much trouble.
    
    lets instead make a function that gets the output names
    
    reading environment file '/nix/store/2x7m69a2sm2kh0r6v0q5s9z1dh41m4xf-xz-5.2.5-env-bin'
    nix: src/nix/develop.cc:299: std::string Common::makeRcScript(nix::ref<nix::Store>, const BuildEnvironment&, const Path&): Assertion `outputs != buildEnvironment.vars.end()' failed.
    
    use a function to get all output names instead of using $outputs
    
    copy env functionality from https://github.com/NixOS/nixpkgs/pull/76732/commits
    Artturin committed Dec 8, 2022
    1 Configuration menu
    Copy the full SHA
    238a605 View commit details
    Browse the repository at this point in the history
  2. work around a nix bug

    Artturin committed Dec 8, 2022
    Configuration menu
    Copy the full SHA
    1c4820e View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    8ad0103 View commit details
    Browse the repository at this point in the history
  4. allow derivation attributes in env

    derivations can be coerced to their output paths
    Artturin committed Dec 8, 2022
    Configuration menu
    Copy the full SHA
    734d7df View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    adc8900 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    18d00c5 View commit details
    Browse the repository at this point in the history
  7. stdenv: export system pname name version for substituteAll

    so we don't have to add these to the env attrset
    Artturin committed Dec 8, 2022
    Configuration menu
    Copy the full SHA
    bb914d8 View commit details
    Browse the repository at this point in the history
  8. treewide: source .attrs in builders

    if theres a source $stdenv then this is needed
    
    for structuredAttrs
    Artturin committed Dec 8, 2022
    Configuration menu
    Copy the full SHA
    c01f509 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    02e3f51 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    c41cc9e View commit details
    Browse the repository at this point in the history
  11. wrapNonDeterministicGcc: fix

    nix-repl> legacyPackages.x86_64-linux.fastStdenv
    error: The ‘env’ attribute set cannot contain any attributes passed to derivation. The following attributes are overlapping: cc
    «derivation
    Artturin committed Dec 8, 2022
    Configuration menu
    Copy the full SHA
    c577eb6 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    89dc806 View commit details
    Browse the repository at this point in the history

Commits on Dec 10, 2022

  1. Configuration menu
    Copy the full SHA
    fda61e9 View commit details
    Browse the repository at this point in the history
  2. tests.stdenv: deduplicate

    Artturin committed Dec 10, 2022
    Configuration menu
    Copy the full SHA
    68fb254 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    bf972f1 View commit details
    Browse the repository at this point in the history
  4. stdenv: detect the type of variable in {prepend,append}ToVar

    stdenv: error if using {prepend,append}ToVar on associative array
    
    i don't know how to prepend to associative array
    Artturin committed Dec 10, 2022
    Configuration menu
    Copy the full SHA
    11c3127 View commit details
    Browse the repository at this point in the history