From 7a5a10980d3a0f28f22e42fc3a159f74d1f3cd11 Mon Sep 17 00:00:00 2001 From: Narice Date: Sat, 14 May 2022 16:36:05 +0100 Subject: [PATCH 01/10] Added overlay and overlays to flake.nix --- flake.nix | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index 002bf09b..29a16526 100644 --- a/flake.nix +++ b/flake.nix @@ -9,9 +9,17 @@ }; outputs = { self, nixpkgs, utils, nixpkgs-wayland }: - utils.lib.eachDefaultSystem (system: + { + overlay = final: prev: { + hyprland = prev.callPackage self { + src = self; + inherit (nixpkgs-wayland.overlay.waylandPkgs) wlroots; + }; + }; + } // utils.lib.eachDefaultSystem (system: let pkgs = nixpkgs.legacyPackages.${system}; in rec { + overlays = [ self.overlay ]; packages = { hyprland = pkgs.callPackage self { src = self; From 1b5c4ffff5ff5675eeba03a78cd1ce3505518dbe Mon Sep 17 00:00:00 2001 From: Narice Date: Sat, 14 May 2022 17:05:27 +0100 Subject: [PATCH 02/10] Fixed apps.default in flake.nix --- flake.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index 29a16526..91dfc5f0 100644 --- a/flake.nix +++ b/flake.nix @@ -30,6 +30,6 @@ apps.hyprland = utils.lib.mkApp { drv = packages.hyprland; }; defaultApp = apps.hyprland; apps.default = - utils.lib.mkApp { drv = self.packages."${system}".default; }; + utils.lib.mkApp { drv = self.packages."${system}".hyprland; }; }); } From 99b7726502f69ede0467c7e17db75693e2677e6c Mon Sep 17 00:00:00 2001 From: Narice Date: Sat, 14 May 2022 17:11:15 +0100 Subject: [PATCH 03/10] Fixing flake --- flake.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index 91dfc5f0..06fa5613 100644 --- a/flake.nix +++ b/flake.nix @@ -28,7 +28,7 @@ }; defaultPackage = packages.hyprland; apps.hyprland = utils.lib.mkApp { drv = packages.hyprland; }; - defaultApp = apps.hyprland; + defaultApp = apps.${system}.hyprland; apps.default = utils.lib.mkApp { drv = self.packages."${system}".hyprland; }; }); From 809f7cd698c04b10b0f5b7b0bc5f05cabacfa5f4 Mon Sep 17 00:00:00 2001 From: Narice Date: Sat, 14 May 2022 17:15:08 +0100 Subject: [PATCH 04/10] Deleting apps in flake.nix --- flake.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/flake.nix b/flake.nix index 06fa5613..66c337f4 100644 --- a/flake.nix +++ b/flake.nix @@ -27,9 +27,9 @@ }; }; defaultPackage = packages.hyprland; - apps.hyprland = utils.lib.mkApp { drv = packages.hyprland; }; - defaultApp = apps.${system}.hyprland; - apps.default = - utils.lib.mkApp { drv = self.packages."${system}".hyprland; }; + # apps.hyprland = utils.lib.mkApp { drv = packages.hyprland; }; + # defaultApp = apps.${system}.hyprland; + # apps.default = + # utils.lib.mkApp { drv = self.packages."${system}".hyprland; }; }); } From f012faea49b4f1c6a5c197262f2fede471c6144b Mon Sep 17 00:00:00 2001 From: Narice Date: Sat, 14 May 2022 17:20:04 +0100 Subject: [PATCH 05/10] Revert "Deleting apps in flake.nix" This reverts commit 809f7cd698c04b10b0f5b7b0bc5f05cabacfa5f4. --- flake.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/flake.nix b/flake.nix index 66c337f4..06fa5613 100644 --- a/flake.nix +++ b/flake.nix @@ -27,9 +27,9 @@ }; }; defaultPackage = packages.hyprland; - # apps.hyprland = utils.lib.mkApp { drv = packages.hyprland; }; - # defaultApp = apps.${system}.hyprland; - # apps.default = - # utils.lib.mkApp { drv = self.packages."${system}".hyprland; }; + apps.hyprland = utils.lib.mkApp { drv = packages.hyprland; }; + defaultApp = apps.${system}.hyprland; + apps.default = + utils.lib.mkApp { drv = self.packages."${system}".hyprland; }; }); } From cde66de09f25c0cbddad553385a871b1b7175ecf Mon Sep 17 00:00:00 2001 From: Narice Date: Sat, 14 May 2022 17:20:22 +0100 Subject: [PATCH 06/10] Revert "Fixing flake" This reverts commit 99b7726502f69ede0467c7e17db75693e2677e6c. --- flake.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index 06fa5613..91dfc5f0 100644 --- a/flake.nix +++ b/flake.nix @@ -28,7 +28,7 @@ }; defaultPackage = packages.hyprland; apps.hyprland = utils.lib.mkApp { drv = packages.hyprland; }; - defaultApp = apps.${system}.hyprland; + defaultApp = apps.hyprland; apps.default = utils.lib.mkApp { drv = self.packages."${system}".hyprland; }; }); From c14fa896e355073270b140f3cc36de8367b3dcb1 Mon Sep 17 00:00:00 2001 From: Narice Date: Sat, 14 May 2022 17:45:39 +0100 Subject: [PATCH 07/10] Fix overlay in flake.nix --- flake.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index 91dfc5f0..afaaaf38 100644 --- a/flake.nix +++ b/flake.nix @@ -13,7 +13,7 @@ overlay = final: prev: { hyprland = prev.callPackage self { src = self; - inherit (nixpkgs-wayland.overlay.waylandPkgs) wlroots; + wlroots = (nixpkgs-wayland.overlay final prev).wlroots; }; }; } // utils.lib.eachDefaultSystem (system: From 6c0a374ba5c165e476aee265173e2c2678f1a105 Mon Sep 17 00:00:00 2001 From: Narice Date: Sun, 15 May 2022 21:40:26 +0100 Subject: [PATCH 08/10] Fixed overlay --- flake.lock | 48 ++++++++++++++++++++++++------------------------ flake.nix | 8 ++++---- 2 files changed, 28 insertions(+), 28 deletions(-) diff --git a/flake.lock b/flake.lock index de779e0b..b2b41913 100644 --- a/flake.lock +++ b/flake.lock @@ -2,11 +2,11 @@ "nodes": { "cachix": { "locked": { - "lastModified": 1651865313, - "narHash": "sha256-fLnmcBaVpJukNIzXZETxtJKLSSTf4LnBCWa/DwyGJBU=", + "lastModified": 1652530570, + "narHash": "sha256-GWRrbUv9l1GSyBkj39s9AqNLX1l3rzVOwvnuG4WYM+E=", "owner": "nixos", "repo": "nixpkgs", - "rev": "ad667404474314806d8071eec4c8ec0db95c17e4", + "rev": "4c560cc7ee57e1fb28e6fd7bdacdf01f948f8a91", "type": "github" }, "original": { @@ -34,11 +34,11 @@ }, "flake-utils": { "locked": { - "lastModified": 1649676176, - "narHash": "sha256-OWKJratjt2RW151VUlJPRALb7OU2S5s+f0vLj4o1bHM=", + "lastModified": 1652557277, + "narHash": "sha256-jSes9DaIVMdmwBB78KkFUVrlDzawmD62vrUg0GS2500=", "owner": "numtide", "repo": "flake-utils", - "rev": "a4b154ebbdc88c8498a5c7b01589addc9e9cb678", + "rev": "12806d31a381e7cd169a6bac35590e7b36dc5fe5", "type": "github" }, "original": { @@ -53,11 +53,11 @@ "nixpkgs-lib": "nixpkgs-lib" }, "locked": { - "lastModified": 1652011770, - "narHash": "sha256-ZX+aDa9db1lNbLI44KK0EjTV2X6gyIqpcuN9RUCy9iI=", + "lastModified": 1652616584, + "narHash": "sha256-9Uc/k/t08QsJ8rl1n/cbT8L/JrCoDuE7TmsE+F1OiS8=", "owner": "nix-community", "repo": "lib-aggregate", - "rev": "89056ca8a9c74ea4440dc53bebcd9c74fc0e1f15", + "rev": "81165c2e94b56afcb9486b82dc91d92dfb503a6b", "type": "github" }, "original": { @@ -68,11 +68,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1651927509, - "narHash": "sha256-fGVGUdEsriuAL1vkUh29FlOQmEkPRnSfRGImWYaVjos=", + "lastModified": 1652574577, + "narHash": "sha256-MoSWPtue4Wi9+kRDxUbLWEBCL8Bswaa8kVMh2JYpSJg=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "2fdb6f2e08e7989b03a2a1aa8538d99e3eeea881", + "rev": "118ec238bfb788a34f1d53c4d95931fadfa70367", "type": "github" }, "original": { @@ -84,11 +84,11 @@ }, "nixpkgs-lib": { "locked": { - "lastModified": 1651970744, - "narHash": "sha256-3X/96C8I5alTCP0FHEx01/YOIvVmjkYoUPX/1Y4Bdsw=", + "lastModified": 1652576347, + "narHash": "sha256-52Wu7hkcIRcS4UenSSrt01J2sAbbQ6YqxZIDpuEPL/c=", "owner": "nix-community", "repo": "nixpkgs.lib", - "rev": "da23418cffc1763e30dba3383eac541afe3e4e70", + "rev": "bdf553800c9c34ed00641785b02038f67f44d671", "type": "github" }, "original": { @@ -105,11 +105,11 @@ "nixpkgs": "nixpkgs_2" }, "locked": { - "lastModified": 1652015544, - "narHash": "sha256-YFjSavZSf6NZFRt2QB5mBccPYd8wrJGKHVH9p75vZtM=", + "lastModified": 1652618007, + "narHash": "sha256-eOH21ElHKORg1kd8Z/qX9naZElAOpCt5fPq26AxMQSw=", "owner": "nix-community", "repo": "nixpkgs-wayland", - "rev": "2d9bc7f3261cc1c2a46d121f94ed483f35d194c2", + "rev": "4588213f577661d37a42c7b6bba04c138c02d78f", "type": "github" }, "original": { @@ -120,11 +120,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1651726670, - "narHash": "sha256-dSGdzB49SEvdOJvrQWfQYkAefewXraHIV08Vz6iDXWQ=", + "lastModified": 1652467128, + "narHash": "sha256-1wuQ7QgPQ3tugYcoVMJ3pUzl4wVdBzKZr9qtJAgA4VI=", "owner": "nixos", "repo": "nixpkgs", - "rev": "c777cdf5c564015d5f63b09cc93bef4178b19b01", + "rev": "fb222e008681fce4608e94f2d1dfdf3d03a364c4", "type": "github" }, "original": { @@ -143,11 +143,11 @@ }, "utils": { "locked": { - "lastModified": 1649676176, - "narHash": "sha256-OWKJratjt2RW151VUlJPRALb7OU2S5s+f0vLj4o1bHM=", + "lastModified": 1652557277, + "narHash": "sha256-jSes9DaIVMdmwBB78KkFUVrlDzawmD62vrUg0GS2500=", "owner": "numtide", "repo": "flake-utils", - "rev": "a4b154ebbdc88c8498a5c7b01589addc9e9cb678", + "rev": "12806d31a381e7cd169a6bac35590e7b36dc5fe5", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index afaaaf38..db290d75 100644 --- a/flake.nix +++ b/flake.nix @@ -13,13 +13,13 @@ overlay = final: prev: { hyprland = prev.callPackage self { src = self; - wlroots = (nixpkgs-wayland.overlay final prev).wlroots; + wlroots = (nixpkgs-wayland.overlays.default final prev).wlroots; }; }; - } // utils.lib.eachDefaultSystem (system: + overlays.default = self.overlay; + } // utils.lib.eachSystem [ "aarch64-linux" "x86_64-linux" ] (system: let pkgs = nixpkgs.legacyPackages.${system}; in rec { - overlays = [ self.overlay ]; packages = { hyprland = pkgs.callPackage self { src = self; @@ -30,6 +30,6 @@ apps.hyprland = utils.lib.mkApp { drv = packages.hyprland; }; defaultApp = apps.hyprland; apps.default = - utils.lib.mkApp { drv = self.packages."${system}".hyprland; }; + utils.lib.mkApp { drv = self.packages.${system}.hyprland; }; }); } From 4f10d8e07dd330bf1c4ce9eebecc0db919e522d9 Mon Sep 17 00:00:00 2001 From: Narice Date: Mon, 16 May 2022 11:33:00 +0100 Subject: [PATCH 09/10] Fixed Hyprland default.nix to provide session --- default.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/default.nix b/default.nix index e15f9174..fcee67fd 100644 --- a/default.nix +++ b/default.nix @@ -40,7 +40,7 @@ stdenv.mkDerivation rec { installPhase = '' cd ../ mkdir -p $out/share/wayland-sessions - cp ./example/hyprland.desktop $out/share/wayland-sessions/ + cp ./example/hyprland.desktop $out/share/wayland-sessions mkdir -p $out/bin cp ./build/Hyprland $out/bin cp ./hyprctl/hyprctl $out/bin @@ -50,6 +50,8 @@ stdenv.mkDerivation rec { cp ./assets/wall_8K.png $out/share/hyprland ''; + passthru.providedSessions = [ "hyprland" ]; + meta = with lib; { homepage = "https://github.com/vaxerski/Hyprland"; description = From 0aacdbdfb6e4b791d294e693d598dce7fd4cb50c Mon Sep 17 00:00:00 2001 From: Narice Date: Mon, 16 May 2022 16:01:28 +0100 Subject: [PATCH 10/10] Fixed build for Nix/OS users --- flake.lock | 27 +++++++++++++++++++++++---- flake.nix | 16 ++++++++++++---- 2 files changed, 35 insertions(+), 8 deletions(-) diff --git a/flake.lock b/flake.lock index b2b41913..061978e7 100644 --- a/flake.lock +++ b/flake.lock @@ -68,11 +68,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1652574577, - "narHash": "sha256-MoSWPtue4Wi9+kRDxUbLWEBCL8Bswaa8kVMh2JYpSJg=", + "lastModified": 1652659998, + "narHash": "sha256-FqNrXC1EE6U2RACwXBlsAvg1lqQGLYpuYb6+W3DL9vA=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "118ec238bfb788a34f1d53c4d95931fadfa70367", + "rev": "1d7db1b9e4cf1ee075a9f52e5c36f7b9f4207502", "type": "github" }, "original": { @@ -138,7 +138,8 @@ "inputs": { "nixpkgs": "nixpkgs", "nixpkgs-wayland": "nixpkgs-wayland", - "utils": "utils" + "utils": "utils", + "wlroots-git": "wlroots-git" } }, "utils": { @@ -155,6 +156,24 @@ "repo": "flake-utils", "type": "github" } + }, + "wlroots-git": { + "flake": false, + "locked": { + "host": "gitlab.freedesktop.org", + "lastModified": 1652629480, + "narHash": "sha256-4mouFPYB2VwgPi92trvAk8JAGjvkYm+DX72sUzljCXA=", + "owner": "wlroots", + "repo": "wlroots", + "rev": "8fe3aa29da56be16faa73aca947647bd60cd4a94", + "type": "gitlab" + }, + "original": { + "host": "gitlab.freedesktop.org", + "owner": "wlroots", + "repo": "wlroots", + "type": "gitlab" + } } }, "root": "root", diff --git a/flake.nix b/flake.nix index db290d75..2a4d5e0a 100644 --- a/flake.nix +++ b/flake.nix @@ -3,17 +3,23 @@ description = "Hyprland is a dynamic tiling Wayland compositor that doesn't sacrifice on its looks."; inputs = { - nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; + nixpkgs.url = "github:NixOS/nixpkgs/nixos-21.11"; utils.url = "github:numtide/flake-utils"; nixpkgs-wayland.url = "github:nix-community/nixpkgs-wayland"; + wlroots-git = { + url = "gitlab:wlroots/wlroots?host=gitlab.freedesktop.org"; + flake = false; + }; }; - outputs = { self, nixpkgs, utils, nixpkgs-wayland }: + outputs = { self, nixpkgs, utils, nixpkgs-wayland, wlroots-git }: { overlay = final: prev: { hyprland = prev.callPackage self { src = self; - wlroots = (nixpkgs-wayland.overlays.default final prev).wlroots; + wlroots = (nixpkgs-wayland.overlays.default final prev).wlroots.overrideAttrs (prev: rec { + src = wlroots-git; + }); }; }; overlays.default = self.overlay; @@ -23,7 +29,9 @@ packages = { hyprland = pkgs.callPackage self { src = self; - inherit (nixpkgs-wayland.packages.${system}) wlroots; + wlroots = nixpkgs-wayland.packages.${system}.wlroots.overrideAttrs (prev: rec { + src = wlroots-git; + }); }; }; defaultPackage = packages.hyprland;