15 Sep 2025 |
raitobezarius | github:// archives doesn't give you submodules, does it? | 18:31:32 |
laurents | well, to be honest, I was working with a local copy of everything, so I hit the but with a "path" input | 18:32:04 |
raitobezarius | I made it work without change to Lix | 18:32:27 |
raitobezarius | just by changing the input type | 18:32:30 |
raitobezarius |
diff --git i/flake.lock w/flake.lock
index 01c49ec..a09a7f1 100644
--- i/flake.lock
+++ w/flake.lock
@@ -11,18 +11,18 @@
},
"locked": {
"lastModified": 1757954848,
- "narHash": "sha256-T/T5Kz2fWZpYNeZlHQ8jomJd6X6nVFpvKqPPhSWFDgM=",
- "owner": "laurents",
- "repo": "alaveteli",
+ "narHash": "sha256-7OvEveYbZHk8KsQKN4KXkuZpMv81JRkPPQj5bJ2Ph18=",
+ "ref": "nix-devenv",
"rev": "3eb0e355f2451bfa6149bb5e732034f8d4ffeaf2",
+ "revCount": 20314,
"submodules": true,
- "type": "github"
+ "type": "git",
+ "url": "https://github.com/laurents/alaveteli"
},
"original": {
- "owner": "laurents",
"ref": "nix-devenv",
- "repo": "alaveteli",
- "type": "github"
+ "type": "git",
+ "url": "https://github.com/laurents/alaveteli"
}
},
"cachix": {
diff --git i/flake.nix w/flake.nix
index f845fe6..b3e936f 100644
--- i/flake.nix
+++ w/flake.nix
@@ -4,7 +4,7 @@
inputs = {
nixpkgs.url = "github:cachix/devenv-nixpkgs/rolling";
alaveteli-flake = {
- url = "github:laurents/alaveteli/nix-devenv";
+ url = "git+https://github.com/laurents/alaveteli?ref=nix-devenv";
inputs.nixpkgs.follows = "nixpkgs";
};
};
| 18:32:51 |
raitobezarius | * diff --git i/flake.lock w/flake.lock
index 01c49ec..a09a7f1 100644
--- i/flake.lock
+++ w/flake.lock
@@ -11,18 +11,18 @@
},
"locked": {
"lastModified": 1757954848,
- "narHash": "sha256-T/T5Kz2fWZpYNeZlHQ8jomJd6X6nVFpvKqPPhSWFDgM=",
- "owner": "laurents",
- "repo": "alaveteli",
+ "narHash": "sha256-7OvEveYbZHk8KsQKN4KXkuZpMv81JRkPPQj5bJ2Ph18=",
+ "ref": "nix-devenv",
"rev": "3eb0e355f2451bfa6149bb5e732034f8d4ffeaf2",
+ "revCount": 20314,
"submodules": true,
- "type": "github"
+ "type": "git",
+ "url": "https://github.com/laurents/alaveteli"
},
"original": {
- "owner": "laurents",
"ref": "nix-devenv",
- "repo": "alaveteli",
- "type": "github"
+ "type": "git",
+ "url": "https://github.com/laurents/alaveteli"
}
},
"cachix": {
diff --git i/flake.nix w/flake.nix
index f845fe6..b3e936f 100644
--- i/flake.nix
+++ w/flake.nix
@@ -4,7 +4,7 @@
inputs = {
nixpkgs.url = "github:cachix/devenv-nixpkgs/rolling";
alaveteli-flake = {
- url = "github:laurents/alaveteli/nix-devenv";
+ url = "git+https://github.com/laurents/alaveteli?ref=nix-devenv";
inputs.nixpkgs.follows = "nixpkgs";
};
};
| 18:32:59 |
raitobezarius | so I guess the question is | 18:33:11 |
raitobezarius | should submodules be an available option with the path fetcher type | 18:33:18 |
raitobezarius | or wait | 18:33:43 |
raitobezarius | you got an error because the thing referred to self.submodules ? | 18:33:48 |
raitobezarius | let me try to reproduce your thing | 18:34:33 |
raitobezarius | with path | 18:34:34 |
laurents | this is the input I had url = "path:/home/laurent/Sites/dada/alaveteli_dev"; | 18:34:35 |
laurents | and that repo is a local clone of the github repo | 18:34:50 |
raitobezarius | aaaaaaaah | 18:36:28 |
raitobezarius | i see | 18:36:29 |
raitobezarius | yeah it's a bug in the flake-self-attrs experimental implementation | 18:36:53 |
raitobezarius | i don't think it should try to pass submodules to the path fetcher | 18:37:03 |
raitobezarius | it should only pass it to a git fetcher | 18:37:07 |
laurents | I'm wondering if git+file:// could work | 18:37:34 |
raitobezarius | static std::set<std::string> allowedAttrs{"submodules"};
auto newRef(ref);
for (auto & attr : *flake.selfAttrs) {
if (!allowedAttrs.contains(attr.first)) {
throw Error("flake 'self' attribute '%s' is not supported", attr.first);
}
newRef.input.attrs.insert_or_assign(attr.first, attr.second);
}
if (newRef != ref) {
return newRef;
}
| 18:38:16 |
raitobezarius | this is the piece of code that is wrong | 18:38:19 |
raitobezarius | nwRef.input.attrs.insert_or_assign should NOT happen if the input DOES NOT support submodules | 18:38:36 |
raitobezarius | and… probably a warning should be emitted to tell you "hey, you are using a fetcher that doesn't support automatically retrieving submodules, this is fine but if you forget to do it, things could not work" | 18:39:06 |
raitobezarius | newRef.input.scheme should be the variable you should use to gate this assign | 18:39:38 |
raitobezarius | newRef.input.scheme == "git" probably | 18:39:43 |
raitobezarius | that being said, not using flakes here would probably be very hard if you want to keep the input.follows behavior | 18:40:28 |
raitobezarius | basically, we need flakes-compat to support the follows system | 18:40:49 |
raitobezarius | and then you wouldn't have to deal with this | 18:40:55 |
raitobezarius | but you'd lose all the flakes CLI | 18:41:03 |