GithubHelp home page GithubHelp logo

Comments (2)

DavHau avatar DavHau commented on August 30, 2024

I'm currently browsing through the open issues trying to make a list of tasks to complete on drv-parts before starting to implement dream2nix: v1 API.

My main question here is: Can we make a multi-drv package interface that is useful to end users without having to change nix?

If I implement the multi-drv interface proposed in the linked nix issue, how would we make this compatible to the current nix which expects drvPath?

from drv-parts.

roberth avatar roberth commented on August 30, 2024

Can we make a multi-drv package interface that is useful to end users without having to change nix?

The linked issue is in part doubling down on the string context, which is already how expressions work in the language. drvPath is conceptually redundant because it's already part of the output strings contexts. Only the CLI boundary uses this shortcut and bad assumption.

Functions like lib.getBin and pkgs.buildEnv already work with output strings (always have, afaik), so users of expression-based systems like NixOS should not encounter any problems with such packages.

how would we make this compatible to the current nix which expects drvPath?

I suppose you could put a derivation that builds a link farm in drvPath. This way at least all the package outputs will continue to exist when queried as a single derivation. This behavior may still lead to surprises, so maybe there's a case to be made for pkg?drvPath == false, or drvPath = throw "This package consists of multiple outputs that are built by distinct derivations. It can't be understood as a single derivation. It's a package deal.";. Or maybe cut the end off that ;)

from drv-parts.

Related Issues (10)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.