Skip to content

New derivation-making builtin #9774

@Ericson2314

Description

@Ericson2314

builtins.derivation (and builtins.derivationStrict) have a number of issues:

  • drvPath has a funky "DrvDeep" string context that needs to be stripped away with the scary-sounding builtins.unsafeDiscardOutputDependency.

  • Mixing together environment variable and magic flags is icky (this also applies to the on-disk .drv format)

  • Returning the arguments to the user provided encourages memory leaks (derivationStrict already improves on this over derivation)

  • Returning the boiled-down inputs (e.g. inputSrcs, inputDrvs) is sometimes useful, and we could just return it here.

  • The outputs are mixed in with the other attributes (separation of dicts and records; see JSON guideline)

  • Remembers meta attributes, including such attributes as

  • Possibly: arbitrary other meta attributes

TODO other things

Priorities

Add 👍 to issues you find important.

Metadata

Metadata

Assignees

No one assigned

    Labels

    derivation designIssues to consider for new versions of the derivation format (major or incremental)featureFeature request or proposallanguageThe Nix expression language; parser, interpreter, primops, evaluation, etcstoreIssues and pull requests concerning the Nix store

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions