Apply lix.overlays.default when not using Lix from nixpkgs #112
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "lix-flake-consistent"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
⚠️ Warning: I don't use this and I don't know very well how people are interacting with this. Please review carefully.
That way we get the exact same package as in the Lix flake (with
additional capnproto patches).
This also means you get the same Lix as it's cached in Hydra.
For instance,
is a cache-hit for me now.
That way we get the exact same package as in the Lix flake (with additional capnproto patches). This also means you get the same Lix as it's cached in Hydra. For instance, $ nix build -L .\#default --override-input lix git+file://$(pwd)/../lix --override-input nixpkgs github:nixos/nixpkgs/e2587caef70cea85dd97d7daab492899902dbf5d is a cache-hit for me now.239f623b26f04da67df4Haven't tested if the hashes now match, but except for the small comments I made, LGTM.The hashes match 🎊
@ -2,7 +2,6 @@inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";inputs.lix = {url = "https://git.lix.systems/lix-project/lix/archive/main.tar.gz";flake = false;The issue with this is that instructions https://wiki.lix.systems/books/contributing/page/running-lix-main#bkmrk-flakes need to be updated to reflect the fact that now
lixis considered a flake. This is not an issue with this PR though.@ -14,3 +14,3 @@config = lib.mkIf cfg.enable {nixpkgs.overlays = [ (import ./overlay.nix { inherit lix versionSuffix; }) ];nixpkgs.overlays = [ (import ./overlay.nix { inherit lix versionSuffix; inherit lib; }) ];Why not
inherit lix versionSuffix lib;directly ?@ -2,7 +2,6 @@inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";inputs.lix = {url = "https://git.lix.systems/lix-project/lix/archive/main.tar.gz";I'm unsure about this, but now that the
lixinput is a flake, shouldn't it follownixpkgs? If so, this should also be stated in the docs I mentioned in the other comment. Anyways, in the updated docs, as it will be told thatlixneeds to be a flake, and that thelixinput of this module should be overridden, it will also be told to follow the user'snixpkgs(if, again, that's needed).Upon further thought, in the perspective of the cache, since
lixis built against newer versions ofnixpkgs, I think it's best to make thenixpkgsinput oflixfollownixpkgs. It's one less line to explicitly specify in users' flake inputs.So I've noticed another hash mismatch: those of
nix-eval-jobsdiffer. I can't say fornix-docandsystem-profileas these seem not to be built by hydra or provided bylix.f04da67df46a0d1ff12c@xaltsc I think our changes belong into one unit, so I squashed them and added a co-authored-by to not lose attribution here. Is that OK for you?
If so, @raito , I believe this is good to go.
@ma27 wrote in #112 (comment):
Fine for me :)
lixfor the overlay #113@ -60,3 +63,3 @@# If it's not available, I guess just do pkgs.lix.# FIXME: does this cause problems in support channels?lixPackageToUse = if lix != null then lixPackageFromSource else (prev.lixPackageSets."${lixAttrName}".lix or prev.lix);lixPackageToUse = branchLix (prev.lixPackageSets."${lixAttrName}".lix or prev.lix) prev.nix;You just forgot to mention in the commit message that
lixnow also comes from the overlay.Isn't that what the commit message says though?
Apply lix.overlays.default when not using Lix from nixpkgsWell, the overlay doesn't provide a
lixpackage (henceprev.nix, which is Lix from the overlay), so it's a tiny bit more than applying the overlay. It's a detail anyway and kind of confusing.You're talking about the overlay from
inputs.lix?Sure, but it's been the case before that the overlay in this repo has
lix = maybeWarnWrongMajor (maybeWarnDuplicate lixPackageToUse);. This is nothing new.ping @xaltsc
It's just that before, IIRC,
lixPackageToUsewas repackaged and did not come from the overlay'snix. Again, it's a minor issue, do as you please, I don't think it impacts the overall quality of the PR that much.Could you ping me everywhere you can when this gets merged, so that I update the wiki as soon as possible ?
Perhaps this is worth an announcement as well on the matrix channel(s) ?
@ -1,10 +1,10 @@{ lix, versionSuffix ? "" }:This is an API break theoretically but that sounds reasonable to me. Perhaps, keep it as an option and warn over it and don't use it?
@ -1,5 +1,5 @@{ lix, versionSuffix ? "" }:This is an API break theoretically but that sounds reasonable to me. Perhaps, keep it as an option and warn over it and don't use it?
@ -1,5 +1,5 @@{ lix, versionSuffix ? "" }:This is an API break theoretically but that sounds reasonable to me. Perhaps, keep it as an option and warn over it and don't use it?
@ -1,11 +1,14 @@{ lix, versionSuffix ? "" }:This is an API break theoretically but that sounds reasonable to me. Perhaps, keep it as an option and warn over it and don't use it?
I'm not sure how this helps though?
You're now expected to pass in
liband that won't appear magically, so breakage will be there in any case.As discussed in person, the breakage is inevitable here, so the arg can be removed right away.
LGTM, modulo the API breakage. I'd like to keep
versionSuffixand warn on it. (I know I use it).@raito I don't remember where and who, but somebody pointed out that it's hard to get cache hits when not using flakes.
The reason is the usage of
lastModifiedDatewhich doesn't exist in fetchGit or rather any non-experimental fetch API.Doesn't have to happen in this PR, but something we should also fix. What's your take on this?
Remove it or expose lastModifiedDate as well? Not sure I even see potential for backwards-incompatibility with such a change.
6a0d1ff12c45ef34e4c745ef34e4c74e1764c6be