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

nix: fix build by deferring submodule fetching #6613

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion nix/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
self,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not necessary to pass self here, as we already have the commit arg.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah I'm sorry, you are right, I didn't notice that. I will push a fix.

lib,
stdenv,
pkg-config,
Expand Down Expand Up @@ -68,7 +69,16 @@ assert lib.assertMsg (!hidpiXWayland) "The option `hidpiXWayland` has been remov
baseName = baseNameOf (toString name);
in
! (lib.hasSuffix ".nix" baseName);
src = lib.cleanSource ../.;
src = lib.cleanSource (
if self ? rev
then builtins.fetchGit {
url = "https://github.com/hyprwm/Hyprland";
inherit (self) rev;
submodules = true;
allRefs = true;
}
else ../.
);
};

postPatch = ''
Expand Down
1 change: 1 addition & 0 deletions nix/overlays.nix
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ in {
version = "${props.version}+date=${date}_${self.shortRev or "dirty"}";
commit = self.rev or "";
inherit date;
inherit (inputs) self;
};
hyprland-unwrapped = final.hyprland.override {wrapRuntimeDeps = false;};
hyprland-debug = final.hyprland.override {debug = true;};
Expand Down
Loading