diff --git a/nix/default.nix b/nix/default.nix index a2302688..bfcabf55 100644 --- a/nix/default.nix +++ b/nix/default.nix @@ -1,4 +1,5 @@ { + self, lib, stdenv, pkg-config, @@ -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 = '' diff --git a/nix/overlays.nix b/nix/overlays.nix index cc66e1b5..ef7e9e02 100644 --- a/nix/overlays.nix +++ b/nix/overlays.nix @@ -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;};