Skip to content

Setting defaults.packages.<package-name> disables autowire #392

Answered by srid
Balint66 asked this question in Q&A
Discussion options

You must be logged in to vote

Okay, I see the problem. You need to use self to refer to the local path. With this, autowire = ["packages"] should also work, obviating from manually wiring the packages yourself.

diff --git a/flake.nix b/flake.nix
index d5c52ca..e5fe0b8 100644
--- a/flake.nix
+++ b/flake.nix
@@ -32,14 +32,10 @@
             };
           packages = {
             foo-common = {
-              source = ./common;
-              local.toCurrentProject = true;
-              local.toDefinedProject = true;
+              source = inp.self + /common;
             };
             foo-frontend = {
-              source = ./frontend;
-              local.toCurrentProject = true;
-              local.toDefinedPro…

Replies: 1 comment 10 replies

Comment options

You must be logged in to vote
10 replies
@srid
Comment options

srid Jan 5, 2025
Maintainer

@Balint66
Comment options

@Balint66
Comment options

@srid
Comment options

srid Jan 9, 2025
Maintainer

Answer selected by Balint66
@Balint66
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #390 on January 04, 2025 22:03.