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

how to deal with string contexts #74

Open
MangoIV opened this issue Feb 27, 2024 · 1 comment
Open

how to deal with string contexts #74

MangoIV opened this issue Feb 27, 2024 · 1 comment

Comments

@MangoIV
Copy link

MangoIV commented Feb 27, 2024

the issue is as follows:

  • for the build time dependencies we want to look up meta/ pname/ ... to find information about our packages
  • for this we must be at the nix level, i.e. with access to the attrset that mkDerivation builds
  • at this point we know the drvPath so we can query the dependencies
  • these dependencies don't necessarily have to be available in the nix level, reason: string contexts; simple example:
pkgs.callPackage ./buildtime-dependencies.nix {} (
  pkgs.runCommand "foo" {} ''cp -r ${pkgs.hello}/bin $out''
)

this package clearly depends on pkgs.hello but bombon doesn't recognize that.

I have not found a solution but a very sad one:

  • build meta for all of the packages that might be included; the user would pass a list of package sets and dependencies to build a meta "database" keyed by the drvPath of the derivation
  • build the dependency tree of some package separately
  • query the "database" against the drvPaths.
@nikstur
Copy link
Owner

nikstur commented Mar 25, 2024

That's a very good observation, thank you! I don't have a clear answer yet how I can/want to solve this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants