-
Notifications
You must be signed in to change notification settings - Fork 14
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
Wire things up in a flake #4
Comments
... wall is in the context of a service provider to divnix/std#165 |
This comment looks like particularly relevant to your flake TL; DR; → edolstra/flake-compat#39 (comment) |
Hi @blaggacao,
From my understanding, this comment is about to don't copying the whole repo into the Nix store but this is not about what I have been talking in this comment. I was more talking about the |
In this case, I don't think I grok the issue, yet. But it also seems like the undesired behaviour is entirely attached to the use of code paths involved in the new flakes commands. So a forward-compatible flake layout, per se, wouldn't be affected, at all. There might be actually a couple of additional requirements to weave |
Maybe there are some misunderstandings. I read "Wire things up in a flake" as "Please provide a flake.nix/flake.lock for js2nix". Together with flake-compat this shouldn't hurt monorepo users The results produced by Am I missing something? |
Oh, I haven't read this in that way. I am fully on board with having |
With So maybe that is not a great idea, if you don't want to look at some flake documentation and doing the occasional Having separate |
The only one aspect of This is great, however, IIUC For example, at the call-site, I would like to have the run time dependency of Node.js to be the 12 version: with import <nixpkgs> { };
let
js2nix = callPackage (builtins.fetchGit {
url = "ssh://[email protected]/canva-public/js2nix.git";
ref = "main";
}) {
nodejs = nodejs_12-x;
};
nodeModules = js2nix.makeNodeModules ./package.json {
tree = js2nix.load ./yarn.lock { };
};
in nodeModules But, if we use I that is correct understanding of how the Meaning, the This will resolve the issue with dependencies injection for non-flake consumers along with make the project a first-class flake for those who use flakes at call sites. And the most importantly we remove the divergence you have been talking above. @typetetris, @blaggacao, what do you think? |
{inputs, system}:
let
inherit (inputs) nixpkgs js2nix;
inherit (nixpkgs.legacyPackages.${system}) callPackage;
js2nix' = callPackage js2nix {
nodejs = nodejs_12-x;
};
nodeModules = js2nix'.makeNodeModules ./package.json {
tree = js2nix'.load ./yarn.lock { };
};
in nodeModules Should * work with a top * At least the nixpkgs library version of Iirc, I've made a patch to |
It removes the I am wondering, would it work if we just do |
Oh, I did remove the functor, then. Must have been for another reason in the Nix CLI jungle. 😄 That approach would also work and in most cases people can operate with |
I've read the TL;DR.
But I'm looking at a wall to climb, now.
As others have pointed out interop is cheap with: https://github.com/edolstra/flake-compat
The text was updated successfully, but these errors were encountered: